WPILib 2012
WPILibRoboticsLibraryforFRC
|
Public Member Functions | |
WaitUntilCommand (double time) | |
WaitUntilCommand (const char *name, double time) | |
Protected Member Functions | |
virtual void | Initialize () |
virtual void | Execute () |
virtual bool | IsFinished () |
virtual void | End () |
virtual void | Interrupted () |
WaitUntilCommand::WaitUntilCommand | ( | double | time | ) |
A WaitCommand will wait until a certain match time before finishing. This will wait until the game clock reaches some value, then continue to the next command.
void WaitUntilCommand::End | ( | ) | [protected, virtual] |
Called when the command ended peacefully. This is where you may want to wrap up loose ends, like shutting off a motor that was being used in the command.
Implements Command.
void WaitUntilCommand::Execute | ( | ) | [protected, virtual] |
void WaitUntilCommand::Initialize | ( | ) | [protected, virtual] |
void WaitUntilCommand::Interrupted | ( | ) | [protected, virtual] |
Called when the command ends because somebody called cancel() or another command shared the same requirements as this one, and booted it out.
This is where you may want to wrap up loose ends, like shutting off a motor that was being used in the command.
Generally, it is useful to simply call the end() method within this method
Implements Command.
bool WaitUntilCommand::IsFinished | ( | ) | [protected, virtual] |
Check if we've reached the actual finish time.
Implements Command.