A command that runs a Runnable continuously.
More...
#include <frc2/command/RunCommand.h>
A command that runs a Runnable continuously.
Has no end condition as-is; either subclass it or use Command.WithTimeout() or Command.Until() to give it one. If you only wish to execute a Runnable once, use InstantCommand.
This class is provided by the NewCommands VendorDep
◆ RunCommand() [1/3]
frc2::RunCommand::RunCommand |
( |
std::function< void()> | toRun, |
|
|
Requirements | requirements = {} ) |
|
explicit |
Creates a new RunCommand.
The Runnable will be run continuously until the command ends. Does not run when disabled.
- Parameters
-
toRun | the Runnable to run |
requirements | the subsystems to require |
◆ RunCommand() [2/3]
frc2::RunCommand::RunCommand |
( |
RunCommand && | other | ) |
|
|
default |
◆ RunCommand() [3/3]
frc2::RunCommand::RunCommand |
( |
const RunCommand & | other | ) |
|
|
default |
The documentation for this class was generated from the following file: