From d3a6d6aa0c1cd18eabe1842fd69fffe84baa6154 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 15 Sep 2024 19:43:43 -0700 Subject: [PATCH 1/2] Add Command:: prefix --- .../src/main/native/cpp/frc2/command/Command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/Command.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/Command.cpp index bf549c5d20b..6c6c8e36cc2 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/Command.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/Command.cpp @@ -84,11 +84,11 @@ CommandPtr Command::OnlyWhile(std::function condition) && { return std::move(*this).ToPtr().OnlyWhile(std::move(condition)); } -CommandPtr After(std::function condition) && { +CommandPtr Command::After(std::function condition) && { return std::move(*this).ToPtr().After(std::move(condition)); } -CommandPtr AfterTime(units::second_t duration) && { +CommandPtr Command::AfterTime(units::second_t duration) && { return std::move(*this).ToPtr().AfterTime(duration); } From dd3f9d4754d574452dec747a51c9ef484ce37f7e Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 15 Sep 2024 19:47:45 -0700 Subject: [PATCH 2/2] Run wpiformat --- .../java/edu/wpi/first/wpilibj2/command/Command.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java index f87e9ea4a96..5ae61c0b10f 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java @@ -220,13 +220,13 @@ public ParallelRaceGroup onlyWhile(BooleanSupplier condition) { /** * Decorates this command to run once a condition becomes true. - * + * *

Note: This decorator works by adding this command to a composition. The command the * decorator was called on cannot be scheduled independently or be added to a different * composition (namely, decorators), unless it is manually cleared from the list of composed * commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition * returned from this method can be further decorated without issue. - * + * * @param condition the condition to wait for * @return the decorated command */ @@ -238,13 +238,13 @@ public SequentialCommandGroup after(BooleanSupplier condition) { /** * Decorates this command to run after a time delay. - * + * *

Note: This decorator works by adding this command to a composition. The command the * decorator was called on cannot be scheduled independently or be added to a different * composition (namely, decorators), unless it is manually cleared from the list of composed * commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition * returned from this method can be further decorated without issue. - * + * * @param seconds the seconds to wait * @return the decorated command */ @@ -254,13 +254,13 @@ public SequentialCommandGroup afterSeconds(double seconds) { /** * Decorates this command to run after a time delay. - * + * *

Note: This decorator works by adding this command to a composition. The command the * decorator was called on cannot be scheduled independently or be added to a different * composition (namely, decorators), unless it is manually cleared from the list of composed * commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition * returned from this method can be further decorated without issue. - * + * * @param time the time to wait * @return the decorated command */