[wpilib] Rename NormalizeWheelSpeeds to DesaturateWheelSpeeds (#3791)

This commit is contained in:
Oblarg
2021-12-30 21:30:08 -05:00
committed by GitHub
parent 102f23bbdb
commit b8d019cdb4
44 changed files with 104 additions and 94 deletions

View File

@@ -82,10 +82,10 @@ class RobotDriveBase : public MotorSafety {
static double ApplyDeadband(double value, double deadband);
/**
* Normalize all wheel speeds if the magnitude of any wheel is greater than
* Renormalize all wheel speeds if the magnitude of any wheel is greater than
* 1.0.
*/
static void Normalize(wpi::span<double> wheelSpeeds);
static void Desaturate(wpi::span<double> wheelSpeeds);
double m_deadband = 0.02;
double m_maxOutput = 1.0;

View File

@@ -136,7 +136,7 @@ class LinearSystemSim {
* @return The normalized input.
*/
Eigen::Vector<double, Inputs> ClampInput(Eigen::Vector<double, Inputs> u) {
return frc::NormalizeInputVector<Inputs>(
return frc::DesaturateInputVector<Inputs>(
u, frc::RobotController::GetInputVoltage());
}