2015-01-11 16:02:49 -05:00
|
|
|
#include "OI.h"
|
2015-02-03 15:55:11 -05:00
|
|
|
#include "Commands/Elevator/Lower.h"
|
|
|
|
#include "Commands/Elevator/Raise.h"
|
|
|
|
#include "Commands/Collector/OpenCollector.h"
|
|
|
|
#include "Commands/Collector/CloseCollector.h"
|
|
|
|
#include "Commands/Collector/CollectTote.h"
|
|
|
|
#include "Commands/Collector/ReleaseTote.h"
|
2015-01-11 16:02:49 -05:00
|
|
|
|
|
|
|
OI::OI() {
|
2015-01-17 12:21:16 -05:00
|
|
|
leftStick=new Joystick(0);
|
|
|
|
rightStick=new Joystick(1);
|
2015-02-02 17:14:27 +00:00
|
|
|
//TODO name these buttons to their functions rather to their number
|
2015-02-07 14:41:30 -05:00
|
|
|
JoystickButton *right1=new JoystickButton(rightStick, 1);
|
|
|
|
JoystickButton *right2=new JoystickButton(rightStick, 2);
|
|
|
|
JoystickButton *right3=new JoystickButton(rightStick, 3);
|
|
|
|
JoystickButton *right4=new JoystickButton(rightStick, 4);
|
|
|
|
JoystickButton *right5=new JoystickButton(rightStick, 5);
|
|
|
|
JoystickButton *right6=new JoystickButton(rightStick, 6);
|
|
|
|
right1->WhileHeld(new OpenCollector());
|
|
|
|
right2->WhileHeld(new CloseCollector());
|
|
|
|
right3->WhileHeld(new CollectTote());
|
|
|
|
right4->WhileHeld(new ReleaseTote());
|
|
|
|
right5->WhenPressed(new Raise());
|
|
|
|
right6->WhenPressed(new Lower());
|
2015-01-17 12:21:16 -05:00
|
|
|
}
|
|
|
|
Joystick* OI::GetRightStick(){
|
|
|
|
return rightStick;
|
|
|
|
}
|
|
|
|
Joystick* OI::GetLeftStick(){
|
|
|
|
return leftStick;
|
2015-01-11 16:02:49 -05:00
|
|
|
}
|
2015-02-07 13:28:08 -05:00
|
|
|
// vim: ts2:sw=2:et
|