[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:
Tyler Veness
2023-09-15 19:57:31 -07:00
committed by GitHub
parent 494cfd78c1
commit 4bac4dd0f4
50 changed files with 189 additions and 193 deletions

View File

@@ -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); },

View File

@@ -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); },

View File

@@ -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

View File

@@ -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");