-
Notifications
You must be signed in to change notification settings - Fork 0
/
OI.cpp
83 lines (79 loc) · 1.6 KB
/
OI.cpp
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
76
77
78
79
80
81
#include "OI.h"
#include "WPILib.h"
OI::OI()
{
// Process operator interface input here.
leftjoy = new Joystick(0);
rightjoy = new Joystick(1);
gamecon = new Joystick(2);
buttonleft = new JoystickButton(leftjoy, 1);
buttonright = new JoystickButton(rightjoy, 1);
buttonleftf = new JoystickButton(leftjoy, 4);
buttonrightf = new JoystickButton(rightjoy, 5);
buttonopen = new JoystickButton(gamecon, 7);
buttonclose = new JoystickButton(gamecon, 8);
buttonforwardl = new JoystickButton(leftjoy, 3);
buttonbackwardl = new JoystickButton(leftjoy, 2);
buttonforwardr = new JoystickButton(rightjoy, 3);
buttonbackwardr = new JoystickButton(rightjoy, 2);
buttonsl = new JoystickButton(leftjoy, 5);
buttonsr = new JoystickButton(rightjoy, 4);
}
Joystick* OI::GetLeftjoy() {
return leftjoy;
}
Joystick* OI::GetRightjoy() {
return rightjoy;
}
JoystickButton* OI::GetButtonLeft()
{
return buttonleft;
}
JoystickButton* OI::GetButtonRight()
{
return buttonright;
}
JoystickButton* OI::GetButtonLeftf()
{
return buttonleftf;
}
JoystickButton* OI::GetButtonRightf()
{
return buttonrightf;
}
Joystick* OI::GetGameCon()
{
return gamecon;
}
JoystickButton* OI::GetButtonOpen()
{
return buttonopen;
}
JoystickButton* OI::GetButtonClose()
{
return buttonclose;
}
JoystickButton* OI::GetButtonFl()
{
return buttonforwardl;
}
JoystickButton* OI::GetButtonFr()
{
return buttonforwardr;
}
JoystickButton* OI::GetButtonBl()
{
return buttonbackwardl;
}
JoystickButton* OI::GetButtonBr()
{
return buttonbackwardr;
}
JoystickButton* OI::GetButtonSl()
{
return buttonsl;
}
JoystickButton* OI::GetButtonSr()
{
return buttonsr;
}