12 #pragma warning(disable : 4521)
18 #include "frc2/command/CommandBase.h"
19 #include "frc2/command/CommandGroupBase.h"
20 #include "frc2/command/CommandHelper.h"
51 template <
class T,
typename = std::enable_if_t<std::is_base_of_v<
52 Command, std::remove_reference_t<T>>>>
55 std::forward<T>(command))) {}
69 void End(
bool interrupted)
override;
72 std::unique_ptr<Command> m_command;
A command that runs another command in perpetuity, ignoring that command's end conditions.
Definition: PerpetualCommand.h:33
void Initialize() override
The initial subroutine of a command.
PerpetualCommand(std::unique_ptr< Command > &&command)
Creates a new PerpetualCommand.
PerpetualCommand(T &&command)
Creates a new PerpetualCommand.
Definition: PerpetualCommand.h:53
void End(bool interrupted) override
The action to take when the command ends.
A state machine representing a complete action to be performed by the robot.
Definition: Command.h:52
void Execute() override
The main body of a command.
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26