/
Global.h
75 lines (57 loc) · 1.57 KB
/
Global.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
66
67
68
69
70
71
72
73
74
75
#ifndef GLOBAL_H
#define GLOBAL_H
#include "WPILib.h"
#include "CSV/CSVReader.h"
/*
* Not the same glorified global as before
* Now, it just has Joysticks, CSV readers
* and other random stuff
*/
class Global{
public:
Global();
//NOTE: DO NOT HIT MODE SWITCH. THIS WILL CHANGE LEFT Y INTO DPAD Y
double ReadCSV(const std::string& valueName);
void ResetCSV();
double LinearizeVictor(double goal_speed);
//Primary Controller
double PrimaryGetLeftX();
double PrimaryGetLeftY();
double PrimaryGetRightX();
double PrimaryGetRightY();
double PrimaryGetDPadX();
bool PrimaryGetLeftBumper();
bool PrimaryGetRightBumper();
bool PrimaryGetLeftTrigger();
bool PrimaryGetRightTrigger();
bool PrimaryGetButtonA();
bool PrimaryGetButtonB();
bool PrimaryGetButtonX();
bool PrimaryGetButtonY();
bool PrimaryGetButtonBack();
bool PrimaryGetButtonStart();
bool PrimaryGetLeftPushDown();
bool PrimaryGetRightPushDown();
//Secondary Controller
double SecondaryGetLeftX();
double SecondaryGetLeftY();
double SecondaryGetRightX();
double SecondaryGetRightY();
double SecondaryGetDPadX();
bool SecondaryGetLeftBumper();
bool SecondaryGetRightBumper();
bool SecondaryGetLeftTrigger();
bool SecondaryGetRightTrigger();
bool SecondaryGetButtonA();
bool SecondaryGetButtonB();
bool SecondaryGetButtonX();
bool SecondaryGetButtonY();
bool SecondaryGetButtonBack();
bool SecondaryGetButtonStart();
bool SecondaryGetLeftPushDown();
bool SecondaryGetRightPushDown();
private:
Joystick *primaryController, *secondaryController;
CSVReader* csvReader;
};
#endif