-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoatMotorDriver.h
More file actions
46 lines (39 loc) · 1.06 KB
/
BoatMotorDriver.h
File metadata and controls
46 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef BOATMOTORDRIVER_H
#define BOATMOTORDRIVER_H
#include "Navigation.h"
#include <iostream>
#include <fstream>
#include <ostream>
#include <string>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include "PaulNovackGlobals.h"
#include "AppConfig.h"
using namespace std;
namespace PaulNovack {
class Navigation;
class AppConfig;
class BoatMotorDriver {
public:
BoatMotorDriver();
BoatMotorDriver(const BoatMotorDriver& orig);
virtual ~BoatMotorDriver();
void setNavigation(Navigation& navigation);
void runCheck();
void turn(std::string direction, float degreesDeviation);
void setConfig(AppConfig& config);
AppConfig* _config = nullptr;
private:
void turnRight();
void turnLeft();
Navigation *navigation = nullptr;
float degrees;
std::string direction;
std::string motorControllerPort;
void GetStepperController();
void Drive(char direction, int steps);
};
}
#endif /* BOATMOTORDRIVER_H */