From cb33bd71dfdfa9444c372e5a0141a3e6f298a4e5 Mon Sep 17 00:00:00 2001 From: Starlight220 <53231611+Starlight220@users.noreply.github.com> Date: Sun, 11 Sep 2022 20:37:55 +0300 Subject: [PATCH] [commands] deprecate withInterrupt decorator (#4407) until() was recently added as a more intuitive alias for this. At this point, keeping this decorator will just cause confusion, given the functionally-equivalent until() alias and the similarly-named getInterruptionBehavior/withInterruptBehavior --- .../src/main/java/edu/wpi/first/wpilibj2/command/Command.java | 2 ++ .../src/main/native/include/frc2/command/Command.h | 2 ++ 2 files changed, 4 insertions(+) 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 9c72c734fb..f154817a0f 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 @@ -110,7 +110,9 @@ public interface Command { * * @param condition the interrupt condition * @return the command with the interrupt condition added + * @deprecated Replace with {@link #until(BooleanSupplier)} */ + @Deprecated(since = "2023") default ParallelRaceGroup withInterrupt(BooleanSupplier condition) { return until(condition); } diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h index a888e24ae2..94b62b1b18 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h @@ -151,7 +151,9 @@ class Command { * * @param condition the interrupt condition * @return the command with the interrupt condition added + * @deprecated Replace with Until() */ + WPI_DEPRECATED("Replace with Until()") ParallelRaceGroup WithInterrupt(std::function condition) &&; /**