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:
@@ -34,7 +34,9 @@ class PIDCommand : public CommandHelper<Command, PIDCommand> {
|
||||
* @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<double()> measurementSource,
|
||||
std::function<double()> setpointSource,
|
||||
@@ -50,7 +52,9 @@ class PIDCommand : public CommandHelper<Command, PIDCommand> {
|
||||
* @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<double()> measurementSource, double setpoint,
|
||||
std::function<void(double)> useOutput,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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<Distance> controller,
|
||||
std::function<Distance_t()> measurementSource,
|
||||
std::function<State()> 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<Distance> controller,
|
||||
std::function<Distance_t()> measurementSource,
|
||||
std::function<Distance_t()> 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<Distance> controller,
|
||||
std::function<Distance_t()> measurementSource, State goal,
|
||||
std::function<void(double, State)> 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<Distance> controller,
|
||||
std::function<Distance_t()> measurementSource,
|
||||
Distance_t goal,
|
||||
|
||||
@@ -17,9 +17,11 @@ namespace frc2 {
|
||||
* This class is provided by the NewCommands VendorDep
|
||||
*
|
||||
* @see ProfiledPIDController
|
||||
* @deprecated Use a ProfiledPIDController instead
|
||||
*/
|
||||
template <class Distance>
|
||||
class ProfiledPIDSubsystem : public SubsystemBase {
|
||||
class [[deprecated("Use a ProfiledPIDController instead")]] ProfiledPIDSubsystem
|
||||
: public SubsystemBase {
|
||||
using Distance_t = units::unit_t<Distance>;
|
||||
using Velocity =
|
||||
units::compound_unit<Distance, units::inverse<units::seconds>>;
|
||||
|
||||
@@ -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<Distance> profile,
|
||||
std::function<void(State)> output,
|
||||
std::function<State()> goal,
|
||||
|
||||
@@ -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 Distance>
|
||||
class TrapezoidProfileSubsystem : public SubsystemBase {
|
||||
class [[deprecated("Use a TrapezoidProfile instead")]] TrapezoidProfileSubsystem
|
||||
: public SubsystemBase {
|
||||
using Distance_t = units::unit_t<Distance>;
|
||||
using Velocity =
|
||||
units::compound_unit<Distance, units::inverse<units::seconds>>;
|
||||
|
||||
Reference in New Issue
Block a user