WPILib 2012
WPILibRoboticsLibraryforFRC
|
Public Member Functions | |
WaitCommand (double timeout) | |
WaitCommand (const char *name, double timeout) | |
Protected Member Functions | |
virtual void | Initialize () |
virtual void | Execute () |
virtual bool | IsFinished () |
virtual void | End () |
virtual void | Interrupted () |
void WaitCommand::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 WaitCommand::Execute | ( | ) | [protected, virtual] |
void WaitCommand::Initialize | ( | ) | [protected, virtual] |
void WaitCommand::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 WaitCommand::IsFinished | ( | ) | [protected, virtual] |
Returns whether this command is finished. If it is, then the command will be removed and end() will be called.
It may be useful for a team to reference the isTimedOut() method for time-sensitive commands.
Implements Command.