8#include <initializer_list>
35 WPI_DEPRECATED(
"Replace with Trigger")
43 WPI_DEPRECATED("Replace with
Trigger")
55 WPI_DEPRECATED("Replace with
Trigger#OnTrue()")
56 Button WhenPressed(Command* command);
68 template <class T, typename = std::enable_if_t<std::is_base_of_v<
69 Command, std::remove_reference_t<T>>>>
70 WPI_DEPRECATED("Replace with Trigger#OnTrue()")
71 Button WhenPressed(T&& command) {
72 WhenActive(std::forward<T>(command));
83 WPI_DEPRECATED("Replace with Trigger#OnTrue(cmd::RunOnce())")
84 Button WhenPressed(std::function<void()> toRun,
85 std::initializer_list<Subsystem*> requirements);
94 WPI_DEPRECATED("Replace with Trigger#OnTrue(cmd::RunOnce())")
95 Button WhenPressed(std::function<void()> toRun,
96 std::span<Subsystem* const> requirements = {});
107 WPI_DEPRECATED("Replace with Trigger#WhileTrue(command.Repeatedly())")
108 Button WhileHeld(Command* command);
120 template <class T, typename = std::enable_if_t<std::is_base_of_v<
121 Command, std::remove_reference_t<T>>>>
122 WPI_DEPRECATED("Replace with Trigger#WhileTrue(command.Repeatedly())")
123 Button WhileHeld(T&& command) {
124 WhileActiveContinous(std::forward<T>(command));
135 WPI_DEPRECATED("Replace with Trigger#WhileTrue(cmd::Run())")
136 Button WhileHeld(std::function<void()> toRun,
137 std::initializer_list<Subsystem*> requirements);
146 WPI_DEPRECATED("Replace with Trigger#WhileTrue(cmd::Run())")
147 Button WhileHeld(std::function<void()> toRun,
148 std::span<Subsystem* const> requirements = {});
159 WPI_DEPRECATED("Replace with Trigger#WhileTrue()")
160 Button WhenHeld(Command* command);
172 template <class T, typename = std::enable_if_t<std::is_base_of_v<
173 Command, std::remove_reference_t<T>>>>
174 WPI_DEPRECATED("Replace with Trigger#WhileTrue()")
175 Button WhenHeld(T&& command) {
176 WhileActiveOnce(std::forward<T>(command));
189 WPI_DEPRECATED("Replace with Trigger#OnFalse()")
190 Button WhenReleased(Command* command);
202 template <class T, typename = std::enable_if_t<std::is_base_of_v<
203 Command, std::remove_reference_t<T>>>>
204 WPI_DEPRECATED("Replace with Trigger#OnFalse()")
205 Button WhenReleased(T&& command) {
206 WhenInactive(std::forward<T>(command));
217 WPI_DEPRECATED("Replace with Trigger#OnFalse(cmd::RunOnce())")
218 Button WhenReleased(std::function<void()> toRun,
219 std::initializer_list<Subsystem*> requirements);
228 WPI_DEPRECATED("Replace with Trigger#OnFalse(cmd::RunOnce())")
229 Button WhenReleased(std::function<void()> toRun,
230 std::span<Subsystem* const> requirements = {});
241 WPI_DEPRECATED("Replace with Trigger#ToggleOnTrue()")
242 Button ToggleWhenPressed(Command* command);
254 template <class T, typename = std::enable_if_t<std::is_base_of_v<
255 Command, std::remove_reference_t<T>>>>
256 WPI_DEPRECATED("Replace with Trigger#ToggleOnTrue()")
257 Button ToggleWhenPressed(T&& command) {
258 ToggleWhenActive(std::forward<T>(command));
271 WPI_DEPRECATED("Pass this as a command end condition with Until() instead.")
272 Button CancelWhenPressed(Command* command);
This class provides an easy way to link commands to conditions.
Definition: Trigger.h:35
Definition: InstantCommand.h:14
Definition: StdDeque.h:50