WPILibC++ 2024.3.2
|
A command that runs a Runnable continuously. More...
#include <frc2/command/RunCommand.h>
Public Member Functions | |
RunCommand (std::function< void()> toRun, Requirements requirements={}) | |
Creates a new RunCommand. More... | |
RunCommand (RunCommand &&other)=default | |
RunCommand (const RunCommand &other)=default | |
Public Member Functions inherited from frc2::CommandHelper< FunctionalCommand, RunCommand > | |
CommandHelper ()=default | |
CommandPtr | ToPtr () &&override |
Additional Inherited Members | |
Protected Member Functions inherited from frc2::CommandHelper< FunctionalCommand, RunCommand > | |
std::unique_ptr< Command > | TransferOwnership () &&override |
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
|
explicit |
Creates a new RunCommand.
The Runnable will be run continuously until the command ends. Does not run when disabled.
toRun | the Runnable to run |
requirements | the subsystems to require |
|
default |
|
default |