tweaks - untested
This commit is contained in:
parent
1b681a3610
commit
1f09e12f2d
@ -163,7 +163,7 @@ private:
|
|||||||
/*
|
/*
|
||||||
* 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
|
||||||
* every itteration of the TeleopPeriodic method (once every 10ms!)
|
* every iteration of the TeleopPeriodic method (once every 10ms!)
|
||||||
* The pickup is disabled when the thumb button is released, but the code still
|
* The pickup is disabled when the thumb button is released, but the code still
|
||||||
* has 'pickupRunning' as true.
|
* has 'pickupRunning' as true.
|
||||||
*/
|
*/
|
||||||
@ -177,10 +177,14 @@ private:
|
|||||||
shooter.PickUp(false);
|
shooter.PickUp(false);
|
||||||
pickupRunning = false;
|
pickupRunning = false;
|
||||||
}
|
}
|
||||||
|
else if(launch_spinny.Get() != 1)
|
||||||
|
{
|
||||||
|
launch_spinny.Set(1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The 'inverting' variable is used to make sure that the drive train isn't getting
|
* The 'inverting' variable is used to make sure that the drive train isn't getting
|
||||||
* inverted every itteration of the TeleopPeriodic method while the button is held down.
|
* inverted every iteration of the TeleopPeriodic method while the button is held down.
|
||||||
* This is important because the TeleopPeriodic method executes something like once every 10ms.
|
* This is important because the TeleopPeriodic method executes something like once every 10ms.
|
||||||
* Thus, this if-else if pair make the button a toggle.
|
* Thus, this if-else if pair make the button a toggle.
|
||||||
*/
|
*/
|
||||||
|
@ -84,13 +84,10 @@ public:
|
|||||||
|
|
||||||
void Shoot()
|
void Shoot()
|
||||||
{
|
{
|
||||||
// TODO: Shooter Logic should go as follows:
|
if (shotClock.Get() > (SPINUP_TIME + 0.1))
|
||||||
|
{
|
||||||
/*
|
state = RESETTING;
|
||||||
Assuming a ball is held in the shooter. When the trigger is pulled,
|
}
|
||||||
the launch-spinny should be STOPPED. Start a Timer object counting
|
|
||||||
When... too hard to write.. I emailed you a flow chart.
|
|
||||||
*/
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case READY:
|
case READY:
|
||||||
@ -152,7 +149,13 @@ public:
|
|||||||
{
|
{
|
||||||
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 * -1));
|
||||||
//launch_spinny->Set(-1.0*PICKUP_POWER);
|
if (state)
|
||||||
|
{
|
||||||
|
launch_spinny->Set(-1.0);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
launch_spinny->Set(1);
|
||||||
|
}
|
||||||
//std::cout << "picking up!\n";
|
//std::cout << "picking up!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user