2015-01-11 16:02:49 -05:00
|
|
|
#include "OI.h"
|
2015-01-17 12:21:16 -05:00
|
|
|
#include "Commands/Lower.h"
|
|
|
|
#include "Commands/Raise.h"
|
|
|
|
#include "Commands/Collect.h"
|
|
|
|
#include "Commands/Eject.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);
|
|
|
|
JoystickButton *left10=new JoystickButton(leftStick, 10);
|
|
|
|
JoystickButton *left11=new JoystickButton(leftStick, 11);
|
|
|
|
left10->WhenPressed(new Eject());
|
|
|
|
left11->WhenPressed(new Collect());
|
|
|
|
}
|
|
|
|
Joystick* OI::GetRightStick(){
|
|
|
|
return rightStick;
|
|
|
|
}
|
|
|
|
Joystick* OI::GetLeftStick(){
|
|
|
|
return leftStick;
|
2015-01-11 16:02:49 -05:00
|
|
|
}
|