diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index f93c676..17f8986 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -155,13 +155,16 @@ private: unjamming = true; shooter.Unjam(); } - else if(unjamming && !operator_stick.GetRawButton(UNJAM)) + else if(!unjamming && operator_stick.GetRawButton(TRIGGER)) + { + shooter.ShootLow(); + unjamming = true; + } + else if(unjamming && !operator_stick.GetRawButton(UNJAM) && !operator_stick.GetRawButton(TRIGGER)) { shooter.PickUp(false); unjamming = false; } - - /* * Run the Shooter only while the THUMB button is held down on the operator stick. * the 'pickupRunning' boolean is there to prevent the shooter from calling PickUp diff --git a/Robot2016/src/Shooter.h b/Robot2016/src/Shooter.h index 0b9d9ee..2b729cc 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 0.5 +#define PICKUP_POWER 0.75 #define LAUNCH_POWER 1 #define SPINUP_TIME 1.5 // seconds. #define LAUNCH_TIME 0.5 @@ -155,7 +155,7 @@ public: void PickUp(bool state = true) { pickup->Set((float) (state * PICKUP_POWER)); - launcher->Set((float) (state * PICKUP_POWER * -1)); + launcher->Set((float) (state * PICKUP_POWER * -0.75)); //ramp->Set(-1.0*PICKUP_POWER); //std::cout << "picking up!\n"; } @@ -168,6 +168,11 @@ public: pickup->Set(-1 * PICKUP_POWER); } + void ShootLow() + { + pickup->Set(-1); + } + void SetPower(float power) { pickup->Set(power);