From 7d276da7a973d8df3efafff246f3bb822aec5376 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Thu, 3 Apr 2014 13:58:02 -0700 Subject: [PATCH] Added a safety check for collecting the ball. Checks that the shooter arm is down before allowing the motor to be spun forwards. --- MyRobot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MyRobot.cpp b/MyRobot.cpp index 02af8f1..6a1fff2 100644 --- a/MyRobot.cpp +++ b/MyRobot.cpp @@ -595,7 +595,7 @@ public: //}}} } //Collector Motor{{{ - if(Lstick.GetRawButton(11)==1){ + if(Lstick.GetRawButton(11)==1&&50<=potToDegrees(armPot.GetAverageVoltage())){ setMotorValue(6,1,1); }else if(Lstick.GetRawButton(12)==1){ setMotorValue(6,1,255);