11 #include <initializer_list>
13 #include <frc/Notifier.h>
14 #include <units/units.h>
15 #include <wpi/ArrayRef.h>
17 #include "frc2/command/CommandBase.h"
18 #include "frc2/command/CommandHelper.h"
41 std::initializer_list<Subsystem*> requirements);
59 void End(
bool interrupted)
override;
62 std::function<void()> m_toRun;
64 units::second_t m_period;
void End(bool interrupted) override
The action to take when the command ends.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:42
A command that starts a notifier to run the given runnable periodically in a separate thread.
Definition: NotifierCommand.h:31
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26
void Initialize() override
The initial subroutine of a command.
NotifierCommand(std::function< void()> toRun, units::second_t period, std::initializer_list< Subsystem * > requirements)
Creates a new NotifierCommand.
Definition: Notifier.h:27