From 99d2397f9b5b441f3de9dc20b6fd5857fcff1534 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Fri, 12 Feb 2016 21:17:45 -0500 Subject: [PATCH] Fixed a bunch of logic errors. --- Robot2016/src/Robot.cpp | 7 ++++--- Robot2016/src/Shooter.h | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 8826677..6ec1e54 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -61,6 +61,7 @@ private: shooter2.Enable(); left_drive.SetInverted(true); right_drive.SetInverted(true); + launch_spinny.SetInverted(true); inverting = false; pickupRunning = false; shooter_power = 0; @@ -143,7 +144,7 @@ private: shooter.PickUp(); pickupRunning = true; } - else if(pickupRunning) + else if(!operator_stick.GetRawButton(THUMB) && pickupRunning) { shooter.PickUp(false); pickupRunning = false; @@ -185,8 +186,8 @@ private: // This code will become obsolete after the Shooter logic is complete. float opThrottle = SaneThrottle(operator_stick.GetThrottle()); - if( opThrottle > shooter_power + DEADZONE_RADIUS - || opThrottle < shooter_power - DEADZONE_RADIUS) + if(!pickupRunning && ( opThrottle > shooter_power + DEADZONE_RADIUS + || opThrottle < shooter_power - DEADZONE_RADIUS)) { shooter.SetPower(opThrottle); } diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index b273940..7b4705d 100644 --- a/Robot2016/src/Shooter.h +++ b/Robot2016/src/Shooter.h @@ -27,7 +27,6 @@ public: pickup = s2; launch_spinny = r; ready = true; - shotClock = Timer(); } /** @@ -52,12 +51,12 @@ public: void LowerRamp() { - launch_spinny->Set(-0.1); + launch_spinny->Set(-0.25); } void RaiseRamp() { - launch_spinny->Set(0.1); + launch_spinny->Set(0.25); } void BoostRamp()