-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOI.cpp
More file actions
46 lines (37 loc) · 1.08 KB
/
Copy pathOI.cpp
File metadata and controls
46 lines (37 loc) · 1.08 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
46
#include "OI.h"
#include "Commands/MoveConveyorUp.h"
#include "Commands/StopConveyor.h"
#include "Commands/MoveConveyorDown.h"
#include "Commands/UndeployRamp.h"
#include "Commands/DeployRamp.h"
#include "Commands/ManualShooter.h"
#include "Commands/AutomaticShooter.h"
OI::OI() {
leftStick = new Joystick(LEFT_JOYSTICK_PORT);
rightStick = new Joystick(RIGHT_JOYSTICK_PORT);
gamePad = new F310(GAME_PAD_PORT);
leftArm = new KinectStick(LEFT_ARM_PORT);
rightArm = new KinectStick(RIGHT_ARM_PORT);
rampDeployButton = new GamepadButton(gamePad, F310::kXButton);
rampUndeployButton = new GamepadButton(gamePad, F310::kBButton);
rampDeployButton->WhenPressed(new DeployRamp());
rampUndeployButton->WhenPressed(new UndeployRamp());
}
Joystick * OI::GetLeftStick() {
return leftStick;
}
Joystick * OI::GetRightStick() {
return rightStick;
}
F310 * OI::GetGamePad() {
return gamePad;
}
KinectStick * OI::GetLeftArm() {
return leftArm;
}
KinectStick * OI::GetRightArm() {
return rightArm;
}
Kinect * OI::GetKinect() {
return kinect;
}