diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDCommand.java
index 360e15bf9d..0a84d37c25 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDCommand.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDCommand.java
@@ -16,7 +16,10 @@ import java.util.function.DoubleSupplier;
* are performed synchronously in the command's execute() method.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a PIDController instead
*/
+@Deprecated(forRemoval = true, since = "2025")
public class PIDCommand extends Command {
/** PID controller. */
protected final PIDController m_controller;
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDSubsystem.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDSubsystem.java
index 8146ca4d7b..3be70d7a1f 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDSubsystem.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/PIDSubsystem.java
@@ -13,7 +13,10 @@ import edu.wpi.first.math.controller.PIDController;
* synchronously from the subsystem's periodic() method.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a PIDController instead
*/
+@Deprecated(forRemoval = true, since = "2025")
public abstract class PIDSubsystem extends SubsystemBase {
/** PID controller. */
protected final PIDController m_controller;
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDCommand.java
index b22ff51c4a..428aabc7d1 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDCommand.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDCommand.java
@@ -18,7 +18,10 @@ import java.util.function.Supplier;
* output are performed synchronously in the command's execute() method.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a ProfiledPIDController instead
*/
+@Deprecated(forRemoval = true, since = "2025")
public class ProfiledPIDCommand extends Command {
/** Profiled PID controller. */
protected final ProfiledPIDController m_controller;
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDSubsystem.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDSubsystem.java
index 05318edc61..7dcc694d54 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDSubsystem.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProfiledPIDSubsystem.java
@@ -9,13 +9,17 @@ import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
import edu.wpi.first.math.controller.ProfiledPIDController;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
+import edu.wpi.first.math.trajectory.TrapezoidProfile.State;
/**
* A subsystem that uses a {@link ProfiledPIDController} to control an output. The controller is run
* synchronously from the subsystem's periodic() method.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a ProfiledPIDController instead
*/
+@Deprecated(forRemoval = true, since = "2025")
public abstract class ProfiledPIDSubsystem extends SubsystemBase {
/** Profiled PID controller. */
protected final ProfiledPIDController m_controller;
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java
index 2fe8fa6d61..6c76bb41f5 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java
@@ -4,10 +4,10 @@
package edu.wpi.first.wpilibj2.command;
-import static edu.wpi.first.math.trajectory.TrapezoidProfile.State;
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
+import edu.wpi.first.math.trajectory.TrapezoidProfile.State;
import java.util.function.Consumer;
import java.util.function.Supplier;
@@ -15,6 +15,8 @@ import java.util.function.Supplier;
* A command that runs a {@link TrapezoidProfile}. Useful for smoothly controlling mechanism motion.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a TrapezoidProfile instead
*/
@Deprecated(since = "2025", forRemoval = true)
public class TrapezoidProfileCommand extends Command {
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileSubsystem.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileSubsystem.java
index 44abdfc4db..b3df8bc772 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileSubsystem.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileSubsystem.java
@@ -13,7 +13,10 @@ import edu.wpi.first.math.trajectory.TrapezoidProfile;
* how to use the current state of the motion profile by overriding the `useState` method.
*
*
This class is provided by the NewCommands VendorDep
+ *
+ * @deprecated Use a TrapezoidProfile instead
*/
+@Deprecated(forRemoval = true, since = "2025")
public abstract class TrapezoidProfileSubsystem extends SubsystemBase {
private final double m_period;
private final TrapezoidProfile m_profile;
diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/PIDCommand.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/PIDCommand.cpp
index 361ec841cc..37778bbbb4 100644
--- a/wpilibNewCommands/src/main/native/cpp/frc2/command/PIDCommand.cpp
+++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/PIDCommand.cpp
@@ -6,6 +6,8 @@
#include
+#include
+
using namespace frc2;
PIDCommand::PIDCommand(frc::PIDController controller,
@@ -19,6 +21,7 @@ PIDCommand::PIDCommand(frc::PIDController controller,
m_useOutput{std::move(useOutput)} {
AddRequirements(requirements);
}
+WPI_IGNORE_DEPRECATED
PIDCommand::PIDCommand(frc::PIDController controller,
std::function measurementSource,
@@ -27,6 +30,7 @@ PIDCommand::PIDCommand(frc::PIDController controller,
: PIDCommand(
controller, measurementSource, [setpoint] { return setpoint; },
useOutput, requirements) {}
+WPI_UNIGNORE_DEPRECATED
void PIDCommand::Initialize() {
m_controller.Reset();
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/PIDCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/PIDCommand.h
index ab16e7dd25..015fca1342 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/PIDCommand.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/PIDCommand.h
@@ -34,7 +34,9 @@ class PIDCommand : public CommandHelper {
* @param setpointSource the controller's reference (aka setpoint)
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a PIDController instead
*/
+ [[deprecated("Use a PIDController instead")]]
PIDCommand(frc::PIDController controller,
std::function measurementSource,
std::function setpointSource,
@@ -50,7 +52,9 @@ class PIDCommand : public CommandHelper {
* @param setpoint the controller's setpoint (aka setpoint)
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a PIDController instead
*/
+ [[deprecated("Use a PIDController instead")]]
PIDCommand(frc::PIDController controller,
std::function measurementSource, double setpoint,
std::function useOutput,
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/PIDSubsystem.h b/wpilibNewCommands/src/main/native/include/frc2/command/PIDSubsystem.h
index af7d298087..64eecd7e07 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/PIDSubsystem.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/PIDSubsystem.h
@@ -16,8 +16,10 @@ namespace frc2 {
* This class is provided by the NewCommands VendorDep
*
* @see PIDController
+ * @deprecated Use a PIDController instead
*/
-class PIDSubsystem : public SubsystemBase {
+class [[deprecated("Use a PIDController instead")]] PIDSubsystem
+ : public SubsystemBase {
public:
/**
* Creates a new PIDSubsystem.
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDCommand.h
index 6fbb12b199..a924c4e4ed 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDCommand.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDCommand.h
@@ -44,7 +44,9 @@ class ProfiledPIDCommand
* @param goalSource the controller's goal
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a ProfiledPIDController instead
*/
+ [[deprecated("Use a ProfiledPIDController instead")]]
ProfiledPIDCommand(frc::ProfiledPIDController controller,
std::function measurementSource,
std::function goalSource,
@@ -66,7 +68,9 @@ class ProfiledPIDCommand
* @param goalSource the controller's goal
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a ProfiledPIDController instead
*/
+ [[deprecated("Use a ProfiledPIDController instead")]]
ProfiledPIDCommand(frc::ProfiledPIDController controller,
std::function measurementSource,
std::function goalSource,
@@ -88,7 +92,10 @@ class ProfiledPIDCommand
* @param goal the controller's goal
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a ProfiledPIDController instead
*/
+
+ [[deprecated("Use a ProfiledPIDController instead")]]
ProfiledPIDCommand(frc::ProfiledPIDController controller,
std::function measurementSource, State goal,
std::function useOutput,
@@ -106,7 +113,9 @@ class ProfiledPIDCommand
* @param goal the controller's goal
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
+ * @deprecated Use a ProfiledPIDController instead
*/
+ [[deprecated("Use a ProfiledPIDController instead")]]
ProfiledPIDCommand(frc::ProfiledPIDController controller,
std::function measurementSource,
Distance_t goal,
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDSubsystem.h b/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDSubsystem.h
index 1dac7fab27..b5786d959e 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDSubsystem.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/ProfiledPIDSubsystem.h
@@ -17,9 +17,11 @@ namespace frc2 {
* This class is provided by the NewCommands VendorDep
*
* @see ProfiledPIDController
+ * @deprecated Use a ProfiledPIDController instead
*/
template
-class ProfiledPIDSubsystem : public SubsystemBase {
+class [[deprecated("Use a ProfiledPIDController instead")]] ProfiledPIDSubsystem
+ : public SubsystemBase {
using Distance_t = units::unit_t;
using Velocity =
units::compound_unit>;
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h
index 7b1d70214d..c44a8ce582 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h
@@ -40,7 +40,9 @@ class TrapezoidProfileCommand
* @param goal The supplier for the desired state
* @param currentState The current state
* @param requirements The list of requirements.
+ * @deprecated Use a TrapezoidProfile instead
*/
+ [[deprecated("Use a TrapezoidProfile instead")]]
TrapezoidProfileCommand(frc::TrapezoidProfile profile,
std::function output,
std::function goal,
diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileSubsystem.h b/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileSubsystem.h
index 5668010312..54b75254c8 100644
--- a/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileSubsystem.h
+++ b/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileSubsystem.h
@@ -16,9 +16,11 @@ namespace frc2 {
* profile by overriding the `UseState` method.
*
* This class is provided by the NewCommands VendorDep
+ * @deprecated Use a TrapezoidProfile instead
*/
template
-class TrapezoidProfileSubsystem : public SubsystemBase {
+class [[deprecated("Use a TrapezoidProfile instead")]] TrapezoidProfileSubsystem
+ : public SubsystemBase {
using Distance_t = units::unit_t;
using Velocity =
units::compound_unit>;