Tweaking pickup
This commit is contained in:
parent
ae402ff1ce
commit
1e9af3ce6d
@ -155,13 +155,16 @@ private:
|
|||||||
unjamming = true;
|
unjamming = true;
|
||||||
shooter.Unjam();
|
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);
|
shooter.PickUp(false);
|
||||||
unjamming = false;
|
unjamming = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run the Shooter only while the THUMB button is held down on the operator stick.
|
* 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
|
* the 'pickupRunning' boolean is there to prevent the shooter from calling PickUp
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef SRC_SHOOTER_H_
|
#ifndef SRC_SHOOTER_H_
|
||||||
#define SRC_SHOOTER_H_
|
#define SRC_SHOOTER_H_
|
||||||
|
|
||||||
#define PICKUP_POWER 0.5
|
#define PICKUP_POWER 0.75
|
||||||
#define LAUNCH_POWER 1
|
#define LAUNCH_POWER 1
|
||||||
#define SPINUP_TIME 1.5 // seconds.
|
#define SPINUP_TIME 1.5 // seconds.
|
||||||
#define LAUNCH_TIME 0.5
|
#define LAUNCH_TIME 0.5
|
||||||
@ -155,7 +155,7 @@ public:
|
|||||||
void PickUp(bool state = true)
|
void PickUp(bool state = true)
|
||||||
{
|
{
|
||||||
pickup->Set((float) (state * PICKUP_POWER));
|
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);
|
//ramp->Set(-1.0*PICKUP_POWER);
|
||||||
//std::cout << "picking up!\n";
|
//std::cout << "picking up!\n";
|
||||||
}
|
}
|
||||||
@ -168,6 +168,11 @@ public:
|
|||||||
pickup->Set(-1 * PICKUP_POWER);
|
pickup->Set(-1 * PICKUP_POWER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShootLow()
|
||||||
|
{
|
||||||
|
pickup->Set(-1);
|
||||||
|
}
|
||||||
|
|
||||||
void SetPower(float power)
|
void SetPower(float power)
|
||||||
{
|
{
|
||||||
pickup->Set(power);
|
pickup->Set(power);
|
||||||
|
Reference in New Issue
Block a user