From f8da6b1d2293fdb1f7cf128833c85be31517579c Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 7 Feb 2015 14:41:30 -0500 Subject: [PATCH] Used rightStick to control buttons --- OI.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OI.cpp b/OI.cpp index 876143d..838c7a9 100644 --- a/OI.cpp +++ b/OI.cpp @@ -10,18 +10,18 @@ OI::OI() { leftStick=new Joystick(0); rightStick=new Joystick(1); //TODO name these buttons to their functions rather to their number - JoystickButton *left1=new JoystickButton(leftStick, 1); - JoystickButton *left2=new JoystickButton(leftStick, 2); - JoystickButton *left3=new JoystickButton(leftStick, 3); - JoystickButton *left4=new JoystickButton(leftStick, 4); - JoystickButton *left5=new JoystickButton(leftStick, 5); - JoystickButton *left6=new JoystickButton(leftStick, 6); - left1->WhileHeld(new OpenCollector()); - left2->WhileHeld(new CloseCollector()); - left3->WhileHeld(new CollectTote()); - left4->WhileHeld(new ReleaseTote()); - left5->WhenPressed(new Raise()); - left6->WhenPressed(new Lower()); + 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()); } Joystick* OI::GetRightStick(){ return rightStick;