WPILibC++ 2024.3.2
|
A command that runs another command repeatedly, restarting it when it ends, until this command is interrupted. More...
#include <frc2/command/RepeatCommand.h>
Public Member Functions | |
RepeatCommand (std::unique_ptr< Command > &&command) | |
Creates a new RepeatCommand. More... | |
template<std::derived_from< Command > T> | |
RepeatCommand (T &&command) | |
Creates a new RepeatCommand. More... | |
RepeatCommand (RepeatCommand &&other)=default | |
RepeatCommand (const RepeatCommand &other)=delete | |
RepeatCommand (RepeatCommand &)=delete | |
void | Initialize () override |
void | Execute () override |
bool | IsFinished () override |
void | End (bool interrupted) override |
bool | RunsWhenDisabled () const override |
Command::InterruptionBehavior | GetInterruptionBehavior () const override |
void | InitSendable (wpi::SendableBuilder &builder) override |
Public Member Functions inherited from frc2::CommandHelper< Command, RepeatCommand > | |
CommandHelper ()=default | |
CommandPtr | ToPtr () &&override |
Additional Inherited Members | |
Protected Member Functions inherited from frc2::CommandHelper< Command, RepeatCommand > | |
std::unique_ptr< Command > | TransferOwnership () &&override |
A command that runs another command repeatedly, restarting it when it ends, until this command is interrupted.
Command instances that are passed to it cannot be added to any other groups, or scheduled individually.
The rules for command compositions apply: command instances that are passed to it are owned by the composition and cannot be added to any other composition or scheduled individually, and the composition requires all subsystems its components require.
This class is provided by the NewCommands VendorDep
|
explicit |
Creates a new RepeatCommand.
Will run another command repeatedly, restarting it whenever it ends, until this command is interrupted.
command | the command to run repeatedly |
|
inlineexplicit |
Creates a new RepeatCommand.
Will run another command repeatedly, restarting it whenever it ends, until this command is interrupted.
command | the command to run repeatedly |
|
default |
|
delete |
|
delete |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |