mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilib] Rename NormalizeWheelSpeeds to DesaturateWheelSpeeds (#3791)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user