From fee9a526e12e32e1ced5fceaf5937b3913879f83 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 --- src/Robot.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Robot.cpp b/src/Robot.cpp index 399834c..29f1b8f 100644 --- a/src/Robot.cpp +++ b/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());