2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

Added binLower, binRaise on joystick

This commit is contained in:
Austen Adler 2015-02-14 13:45:54 -05:00
parent e66a67143a
commit e07c7a2da7

18
OI.cpp
View File

@ -24,27 +24,21 @@ OI::OI() {
// Elevator // Elevator
raise=new Raise(); raise=new Raise();
lower=new Lower(); lower=new Lower();
JoystickButton *right3=new JoystickButton(rightStick, 3);
JoystickButton *right4=new JoystickButton(rightStick, 4); JoystickButton *right4=new JoystickButton(rightStick, 4);
JoystickButton *right5=new JoystickButton(rightStick, 5);
JoystickButton *right6=new JoystickButton(rightStick, 6); JoystickButton *right6=new JoystickButton(rightStick, 6);
right3->WhenPressed(lower);
right4->WhenPressed(lower); right4->WhenPressed(lower);
right3->CancelWhenPressed(raise);
right4->CancelWhenPressed(raise); right4->CancelWhenPressed(raise);
right5->WhenPressed(raise);
right6->WhenPressed(raise); right6->WhenPressed(raise);
right5->CancelWhenPressed(lower);
right6->CancelWhenPressed(lower); right6->CancelWhenPressed(lower);
// BinElevator // BinElevator
JoystickButton *right3=new JoystickButton(rightStick, 3);
JoystickButton *right5=new JoystickButton(rightStick, 5);
binRaise=new BinRaise(); binRaise=new BinRaise();
binLower=new BinLower(); binLower=new BinLower();
JoystickButton *right7=new JoystickButton(rightStick, 7); right3->WhenPressed(binLower);
JoystickButton *right8=new JoystickButton(rightStick, 8); right3->CancelWhenPressed(binRaise);
right7->WhenPressed(binLower); right5->WhenPressed(binRaise);
right7->CancelWhenPressed(binRaise); right5->CancelWhenPressed(binLower);
right8->WhenPressed(binRaise);
right8->CancelWhenPressed(binLower);
// Cancel // Cancel
JoystickButton *right12=new JoystickButton(rightStick, 12); JoystickButton *right12=new JoystickButton(rightStick, 12);
right12->CancelWhenPressed(raise); right12->CancelWhenPressed(raise);