RepeatCommand

class RepeatCommand : public Command

Makes a Command repeat each time after it is run.

Public Functions

inline explicit RepeatCommand(Command *command)

Create a RepeatCommand with a Command pointer.

Parameters:

command – The Command to make into a RepeatCommand

inline virtual void initialize() override

Just initializes the Command.

inline virtual void execute() override

Executes the Command, if it is finished it restarts the Command.

inline virtual void end(bool interrupted) override

Ends the Command with interrupted set to true.

Parameters:

interrupted – Ignored, if the command is ended it must be interrupted because it is always restarting

inline virtual std::vector<Subsystem*> getRequirements() override

Passes on the requirements of the Command that was passed in.

Returns:

The requirements of the Command that was passed in