ramp reinstated

This commit is contained in:
Jason Cox 2016-02-12 19:37:36 -05:00
parent 91acd20f7d
commit e061b741cb
2 changed files with 29 additions and 6 deletions

View File

@ -112,17 +112,25 @@ private:
// This is shit code for testing. Replace it with real code.
if(operator_stick.GetRawButton(RAMP_RAISE))
{
launch_spinny.Set(1);
//launch_spinny.Set(1);
shooter.RaiseRamp();
}
else if(operator_stick.GetRawButton(RAMP_LOWER))
{
launch_spinny.Set(-1);
//launch_spinny.Set(-1);
shooter.LowerRamp();
}
else if(operator_stick.GetRawButton(TRIGGER))
{
shooter.BoostRamp();
}
else
{
launch_spinny.Set(0);
}
/*
* 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

View File

@ -45,9 +45,24 @@ public:
void StopShooter()
{
ready = true;
launch_spinny.Set(0);
launcher.Set(0);
pickup.Set(0);
launch_spinny->Set(0);
launcher->Set(0);
pickup->Set(0);
}
void LowerRamp()
{
launch_spinny->Set(-0.1);
}
void RaiseRamp()
{
launch_spinny->Set(0.1);
}
void BoostRamp()
{
launch_spinny->Set(0.5);
}
void Shoot()
@ -65,7 +80,7 @@ public:
void PickUp(bool state = true)
{
pickup->Set((float) (state * PICKUP_POWER));
launch_spinny->Set(-1.0*PICKUP_POWER);
//launch_spinny->Set(-1.0*PICKUP_POWER);
std::cout << "picking up!\n";
}