-
Notifications
You must be signed in to change notification settings - Fork 0
/
OI.cpp
32 lines (27 loc) · 914 Bytes
/
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
#include "OI.h"
#include "Robotmap.h"
//#include "Commands/AlignWithTarget.h"
//#include "commands/SetLauncherSpeed.h"
OI::OI() {
// Process operator interface input here.
driverStick = new Joystick(DRIVER_JOYSTICK_PORT);
/*
launcherStick = new Joystick(LAUNCHER_JOYSTICK_PORT);
topSpeed = new JoystickButton(launcherStick, TOP_LAUNCHER_SPEED);
mediumSpeed = new JoystickButton(launcherStick, MEDIUM_LAUNCHER_SPEED);
bottomSpeed = new JoystickButton(launcherStick, BOTTOM_LAUNCHER_SPEED);
targettingButton = new JoystickButton(launcherStick, START_TARGETTING);
targettingButton->WhenPressed(new AlignWithTarget());
topSpeed->WhenPressed(new SetLauncherSpeed(1));
mediumSpeed->WhenPressed(new SetLauncherSpeed(0.5));
bottomSpeed->WhenPressed(new SetLauncherSpeed(0));
*/
}
Joystick* OI::getDriverJoystick()
{
return driverStick;
}
Joystick* OI::getLauncherJoystick()
{
return launcherStick;
}