From 9ac893271f93f9e22db4daeac43756aed33531c6 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 --- src/Shooter.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Shooter.h b/src/Shooter.h index 9c8af1e..f948abe 100644 --- a/src/Shooter.h +++ b/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; }