[commands] Deprecate control commands and subsystems (#7143)

This commit is contained in:
Gold856
2024-10-11 22:48:47 -04:00
committed by GitHub
parent 77ee9bdd30
commit 22a04bf470
13 changed files with 47 additions and 4 deletions

View File

@@ -16,7 +16,10 @@ import java.util.function.DoubleSupplier;
* are performed synchronously in the command's execute() method.
*
* <p>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;

View File

@@ -13,7 +13,10 @@ import edu.wpi.first.math.controller.PIDController;
* synchronously from the subsystem's periodic() method.
*
* <p>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;

View File

@@ -18,7 +18,10 @@ import java.util.function.Supplier;
* output are performed synchronously in the command's execute() method.
*
* <p>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;

View File

@@ -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.
*
* <p>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;

View File

@@ -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.
*
* <p>This class is provided by the NewCommands VendorDep
*
* @deprecated Use a TrapezoidProfile instead
*/
@Deprecated(since = "2025", forRemoval = true)
public class TrapezoidProfileCommand extends Command {

View File

@@ -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.
*
* <p>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;