diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 6dd945d..7688ac4 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -9,7 +9,7 @@ #define RAMP_RAISE 3 // Button 3 for Raising Ramp #define RAMP_LOWER 4 // Button 4 to lower ramp. -#define DEADZONE_RADIUS 0.05 // Deadzone Radius prevents tiny twitches in the joystick's value from +#define DEADZONE_RADIUS 0.01 // Deadzone Radius prevents tiny twitches in the joystick's value from // affecting the robot. Use this for cleaning up drive train and shooter. // Also used for detecting changes in an axis' value. @@ -118,24 +118,28 @@ private: // This is shit code for testing. Replace it with real code. if(!ramping && operator_stick.GetRawButton(RAMP_RAISE)) { + std::cout << "Raising Ramp."; //launch_spinny.Set(1); shooter.RaiseRamp(); ramping =true; } else if(!ramping && operator_stick.GetRawButton(RAMP_LOWER)) { + std::cout << "Lowering Ramp."; //launch_spinny.Set(-1); shooter.LowerRamp(); ramping = true; } - else if(!ramping && operator_stick.GetRawButton(TRIGGER)) + /*else if(!ramping && operator_stick.GetRawButton(TRIGGER)) { shooter.BoostRamp(); ramping = true; - } + }*/ else if(ramping) { - launch_spinny.Set(0); + std::cout << "Stopping Ramp."; + shooter.StopRamp(); + ramping = false; } @@ -182,7 +186,7 @@ private: * Every time the method is called. This cannot be a loop in the Shoot method because * that would lock the robot every time the trigger is hit. */ - if(operator_stick.GetRawButton(TRIGGER) && !shooting) + if(operator_stick.GetRawButton(TRIGGER)) { shooting = true; shooter.Shoot(); diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index 8dbdc57..a388f33 100644 --- a/Robot2016/src/Shooter.h +++ b/Robot2016/src/Shooter.h @@ -8,7 +8,7 @@ #ifndef SRC_SHOOTER_H_ #define SRC_SHOOTER_H_ -#define PICKUP_POWER 1.0 +#define PICKUP_POWER 0.5 #define SPINUP_TIME 1.5 // seconds. class Shooter @@ -84,6 +84,7 @@ public: void PickUp(bool state = true) { pickup->Set((float) (state * PICKUP_POWER)); + launcher->Set((float) (state * PICKUP_POWER * -1)); //launch_spinny->Set(-1.0*PICKUP_POWER); std::cout << "picking up!\n"; }