mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[commands] Revert "Change grouping decorator impl to flatten nested group structures (#3335)" (#4402)
This reverts commit ef4ea84cb5.
This commit is contained in:
@@ -130,7 +130,7 @@ class Command {
|
||||
* @param duration the timeout duration
|
||||
* @return the command with the timeout added
|
||||
*/
|
||||
virtual ParallelRaceGroup WithTimeout(units::second_t duration) &&;
|
||||
ParallelRaceGroup WithTimeout(units::second_t duration) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with an interrupt condition. If the specified
|
||||
@@ -141,7 +141,7 @@ class Command {
|
||||
* @param condition the interrupt condition
|
||||
* @return the command with the interrupt condition added
|
||||
*/
|
||||
virtual ParallelRaceGroup Until(std::function<bool()> condition) &&;
|
||||
ParallelRaceGroup Until(std::function<bool()> condition) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with an interrupt condition. If the specified
|
||||
@@ -152,7 +152,7 @@ class Command {
|
||||
* @param condition the interrupt condition
|
||||
* @return the command with the interrupt condition added
|
||||
*/
|
||||
virtual ParallelRaceGroup WithInterrupt(std::function<bool()> condition) &&;
|
||||
ParallelRaceGroup WithInterrupt(std::function<bool()> condition) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with a runnable to run before this command starts.
|
||||
@@ -161,7 +161,7 @@ class Command {
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual SequentialCommandGroup BeforeStarting(
|
||||
SequentialCommandGroup BeforeStarting(
|
||||
std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements) &&;
|
||||
|
||||
@@ -172,7 +172,7 @@ class Command {
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual SequentialCommandGroup BeforeStarting(
|
||||
SequentialCommandGroup BeforeStarting(
|
||||
std::function<void()> toRun,
|
||||
wpi::span<Subsystem* const> requirements = {}) &&;
|
||||
|
||||
@@ -183,7 +183,7 @@ class Command {
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual SequentialCommandGroup AndThen(
|
||||
SequentialCommandGroup AndThen(
|
||||
std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements) &&;
|
||||
|
||||
@@ -194,7 +194,7 @@ class Command {
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual SequentialCommandGroup AndThen(
|
||||
SequentialCommandGroup AndThen(
|
||||
std::function<void()> toRun,
|
||||
wpi::span<Subsystem* const> requirements = {}) &&;
|
||||
|
||||
@@ -206,7 +206,7 @@ class Command {
|
||||
* @deprecated replace with EndlessCommand
|
||||
*/
|
||||
WPI_DEPRECATED("Replace with Endlessly()")
|
||||
virtual PerpetualCommand Perpetually() &&;
|
||||
PerpetualCommand Perpetually() &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run endlessly, ignoring its ordinary end
|
||||
@@ -214,7 +214,7 @@ class Command {
|
||||
*
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual EndlessCommand Endlessly() &&;
|
||||
EndlessCommand Endlessly() &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run repeatedly, restarting it when it ends, until
|
||||
@@ -222,7 +222,7 @@ class Command {
|
||||
*
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual RepeatCommand Repeatedly() &&;
|
||||
RepeatCommand Repeatedly() &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run "by proxy" by wrapping it in a
|
||||
@@ -232,7 +232,7 @@ class Command {
|
||||
*
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual ProxyScheduleCommand AsProxy();
|
||||
ProxyScheduleCommand AsProxy();
|
||||
|
||||
/**
|
||||
* Decorates this command to only run if this condition is not met. If the
|
||||
@@ -243,7 +243,7 @@ class Command {
|
||||
* @param condition the condition that will prevent the command from running
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual ConditionalCommand Unless(std::function<bool()> condition) &&;
|
||||
ConditionalCommand Unless(std::function<bool()> condition) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run or stop when disabled.
|
||||
@@ -251,7 +251,7 @@ class Command {
|
||||
* @param doesRunWhenDisabled true to run when disabled.
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual std::unique_ptr<Command> IgnoringDisable(bool doesRunWhenDisabled) &&;
|
||||
std::unique_ptr<Command> IgnoringDisable(bool doesRunWhenDisabled) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run or stop when disabled.
|
||||
@@ -259,7 +259,7 @@ class Command {
|
||||
* @param interruptBehavior true to run when disabled.
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual std::unique_ptr<Command> WithInterruptBehavior(
|
||||
std::unique_ptr<Command> WithInterruptBehavior(
|
||||
InterruptionBehavior interruptBehavior) &&;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user