From 4fe84f0017a2a1bfa783be8e0ac6439bf24b2def Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Wed, 17 Feb 2016 15:22:25 -0500 Subject: [PATCH] Added check on limit switches to prevent uneccessary motor power setting on the RAMP --- Robot2016/src/Shooter.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index 9c8af1e..f948abe 100644 --- a/Robot2016/src/Shooter.h +++ b/Robot2016/src/Shooter.h @@ -64,12 +64,14 @@ public: void LowerRamp() { - launch_spinny->Set(-1); + if(launch_spinny->GetReverseLimitOK()) + launch_spinny->Set(-1); } void RaiseRamp() { - launch_spinny->Set(1); + if(launch_spinny->GetForwardLimitOK()) + launch_spinny->Set(1); } void StopRamp() @@ -109,7 +111,7 @@ public: shotClock.Start(); } else { - std::cout << "*Goku noises*\n"; + //std::cout << "*Goku noises*\n"; } break; }