From 57fb961f22654eefe71d22b3ae03102ebfa68b0b Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Sat, 13 Feb 2016 16:47:57 -0500 Subject: [PATCH] Code for moving arms... boring --- Robot2016/src/Robot.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 399834c..29f1b8f 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -222,7 +222,21 @@ private: shooter.StopShooter(); } - + if(!arming && driver_stick.GetRawButton(RAMP_RAISE)) + { + arming = true; + arms.Set(1); + } + else if(!arming && driver_stick.GetRawButton(RAMP_LOWER)) + { + arming = true; + arms.Set(-1); + } + else if(arming && !driver_stick.GetRawButton(RAMP_RAISE) && !driver_stick.GetRawButton(RAMP_LOWER)) + { + arming = false; + arms.Set(0); + } // This code will become obsolete after the Shooter logic is complete. float opThrottle = SaneThrottle(operator_stick.GetThrottle());