tweaks - untested

This commit is contained in:
Aidan Ferguson 2016-02-15 20:54:20 -05:00
parent 043707478d
commit 1938d4b935
2 changed files with 17 additions and 10 deletions

View File

@ -163,7 +163,7 @@ private:
/*
* 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
* 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
* has 'pickupRunning' as true.
*/
@ -177,10 +177,14 @@ private:
shooter.PickUp(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
* 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.
* Thus, this if-else if pair make the button a toggle.
*/

View File

@ -84,13 +84,10 @@ public:
void Shoot()
{
// TODO: Shooter Logic should go as follows:
/*
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.
*/
if (shotClock.Get() > (SPINUP_TIME + 0.1))
{
state = RESETTING;
}
switch (state)
{
case READY:
@ -152,7 +149,13 @@ public:
{
pickup->Set((float) (state * PICKUP_POWER));
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";
}