-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFarmhand.h
66 lines (45 loc) · 1.27 KB
/
Farmhand.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef FARMHAND
#define FARMHAND
//#include <StandardCplusplus.h>
#include <Arduino.h>
#define FH_STRING ">FH"
#define FH_STRING_LEN 3
class Farmhand
{
private:
int FH_number; //number of which farmhand unit the message is being sent to
int throttle_;
int angRate_;
int throttlePWM_;
int angRatePWM_;
int serialport_;
long serialbaud_;
public:
Farmhand(void);
~Farmhand(void);
double latitude, longitude;
int AprilAngle;
int AprilID;
unsigned long AprilTime;
String GPSLatMessageHeader;
String GPSLonMessageHeader;
String CamAprilAngle;
String CamOdomHeader;
String CamColourHeader;
String CamAprilID;
void drive(int,int);
void moveArm(int height);
void getThrottlePWM(int throttle);
void getAngRatePWM(int angRate);
void initialise(long baud = 115200);
void readData(void);
int ProcessDataStream(String Buffer);
int ProcessLatGPS(String Buffer);
int ProcessLonGPS(String Buffer);
int ProcessAprilAngle(String Buffer);
int ProcessAprilID(String Buffer);
bool TagAvailable(void);
double getLat(void);
double getLon(void);
};
#endif