From 65b09fdf3335e8386c7dacf9361b098c4e811264 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Fri, 9 Oct 2015 23:04:28 +0000 Subject: [PATCH] removed half speed button --- Commands/Elevator/Lower.cpp | 3 --- Commands/Elevator/Raise.cpp | 3 --- OI.cpp | 4 +++- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Commands/Elevator/Lower.cpp b/Commands/Elevator/Lower.cpp index 5cca4c9..042670c 100644 --- a/Commands/Elevator/Lower.cpp +++ b/Commands/Elevator/Lower.cpp @@ -8,9 +8,6 @@ Lower::Lower(double timeout, bool useSoftLimits, double liftSpeed): Command("Low } void Lower::Initialize() {} void Lower::Execute() { - if(DentRobot::oi->GetRightStick()->GetRawButton(11)){ - speed*=0.5; - } DentRobot::elevator->Run(speed); } bool Lower::IsFinished() { diff --git a/Commands/Elevator/Raise.cpp b/Commands/Elevator/Raise.cpp index b36e3f9..10bc2aa 100644 --- a/Commands/Elevator/Raise.cpp +++ b/Commands/Elevator/Raise.cpp @@ -8,9 +8,6 @@ Raise::Raise(double timeout, bool useSoftLimits, double liftSpeed): Command("Rai } void Raise::Initialize() {} void Raise::Execute() { - if(DentRobot::oi->GetRightStick()->GetRawButton(11)){ - speed*=0.5; - } DentRobot::elevator->Run(speed); } bool Raise::IsFinished() { diff --git a/OI.cpp b/OI.cpp index a43423c..821a5c1 100644 --- a/OI.cpp +++ b/OI.cpp @@ -39,6 +39,7 @@ OI::OI() { // Elevator JoystickButton *right4 = new JoystickButton(rightStick, 4); + JoystickButton *right5 = new JoystickButton(rightStick, 5); JoystickButton *right6 = new JoystickButton(rightStick, 6); JoystickButton *right11 = new JoystickButton(rightStick, 11); JoystickButton *right12 = new JoystickButton(rightStick, 12); @@ -46,7 +47,8 @@ OI::OI() { right12->WhenPressed(new CloseArm(2)); //Full speed lift right4->WhileHeld(new Lower(3.5,false,1)); - right6->WhileHeld(new Raise(3.5,false,-1)); + right5->WhileHeld(new Raise(3.5,false,0.5)); + right6->WhileHeld(new Raise(3.5,false,-0.5)); } Joystick* OI::GetRightStick() { return rightStick;