Tweaking pickup
This commit is contained in:
parent
d914ecf5e0
commit
4d13792643
@ -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
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user