mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Move PIDController from frc2 to frc namespace (#5640)
The old PIDController class in the frc namespace was removed for the 2023 season.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
DriveStraight::DriveStraight(double distance, Drivetrain& drivetrain)
|
||||
: frc2::CommandHelper<frc2::PIDCommand, DriveStraight>{
|
||||
frc2::PIDController{4, 0, 0},
|
||||
frc::PIDController{4, 0, 0},
|
||||
[&drivetrain] { return drivetrain.GetDistance(); },
|
||||
distance,
|
||||
[&drivetrain](double output) { drivetrain.Drive(output, output); },
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
SetDistanceToBox::SetDistanceToBox(double distance, Drivetrain& drivetrain)
|
||||
: frc2::CommandHelper<frc2::PIDCommand, SetDistanceToBox>{
|
||||
frc2::PIDController{-2, 0, 0},
|
||||
frc::PIDController{-2, 0, 0},
|
||||
[&drivetrain] { return drivetrain.GetDistanceToObstacle(); },
|
||||
distance,
|
||||
[&drivetrain](double output) { drivetrain.Drive(output, output); },
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
|
||||
Elevator::Elevator()
|
||||
: frc2::PIDSubsystem{frc2::PIDController{kP_real, kI_real, 0}} {
|
||||
: frc2::PIDSubsystem{frc::PIDController{kP_real, kI_real, 0}} {
|
||||
#ifdef SIMULATION // Check for simulation and update PID values
|
||||
GetPIDController()->SetPID(kP_simulation, kI_simulation, 0, 0);
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
|
||||
Wrist::Wrist() : frc2::PIDSubsystem{frc2::PIDController{kP, 0, 0}} {
|
||||
Wrist::Wrist() : frc2::PIDSubsystem{frc::PIDController{kP, 0, 0}} {
|
||||
m_controller.SetTolerance(2.5);
|
||||
|
||||
SetName("Wrist");
|
||||
|
||||
Reference in New Issue
Block a user