Fixed a bunch of logic errors.
This commit is contained in:
parent
e061b741cb
commit
63f3c48267
@ -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);
|
||||
}
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user