mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[commands] Deprecate control commands and subsystems (#7143)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user