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 a53d792d0e4..35b23cb8365 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 @@ -514,7 +514,12 @@ public WrapperCommand handleInterrupt(Runnable handler) { }); } - /** Schedules this command. */ + /** + * Schedules this command. + * + * @deprecated Use CommandScheduler.getInstance().schedule(Command...) instead + */ + @Deprecated(since = "2025", forRemoval = true) public void schedule() { CommandScheduler.getInstance().schedule(this); } diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h index c4af1afe81b..24d579e1bcd 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h @@ -406,7 +406,10 @@ class Command : public wpi::Sendable, public wpi::SendableHelper { /** * Schedules this command. + * + * @deprecated Use CommandScheduler::GetInstance().Schedule() instead */ + [[deprecated("Use CommandScheduler::GetInstance().Schedule() instead.")]] void Schedule(); /**