diff --git a/Commands/Elevator/Lower.cpp b/Commands/Elevator/Lower.cpp index 042670c..5cca4c9 100644 --- a/Commands/Elevator/Lower.cpp +++ b/Commands/Elevator/Lower.cpp @@ -8,6 +8,9 @@ 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 10bc2aa..b36e3f9 100644 --- a/Commands/Elevator/Raise.cpp +++ b/Commands/Elevator/Raise.cpp @@ -8,6 +8,9 @@ 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 02aa2c2..e035daf 100644 --- a/OI.cpp +++ b/OI.cpp @@ -42,19 +42,13 @@ OI::OI() { cycle = new ElevatorCycle(); JoystickButton *left11 = new JoystickButton(leftStick, 11); JoystickButton *left12 = new JoystickButton(leftStick, 12); - JoystickButton *right3 = new JoystickButton(rightStick, 3); JoystickButton *right4 = new JoystickButton(rightStick, 4); - JoystickButton *right5 = new JoystickButton(rightStick, 5); JoystickButton *right6 = new JoystickButton(rightStick, 6); left11->WhenPressed(new OpenArm(2)); left12->WhenPressed(new CloseArm(2)); //Full speed lift right4->WhileHeld(new Lower(3.5,false,1)); right6->WhileHeld(new Raise(3.5,false,-1)); - //Half speed lift - right5->WhileHeld(new Raise(3.5,false,-0.5)); - right5->WhileHeld(new RollIn(0.35)); - right3->WhileHeld(new Lower(3.5,false,0.5)); // BinCollector