[wpimath] Replace Speeds with Velocities (#8479)

I left "free speed" alone since that's the technical term for it. In
general, velocity is a vector quantity, and speed is a magnitude (i.e.,
a strictly positive value).

This PR also replaces the speed verbiage in MotorController with duty
cycle.

Fixes #8423.
This commit is contained in:
Tyler Veness
2026-03-06 14:19:15 -08:00
committed by GitHub
parent 1e39f39128
commit 9bd9656871
594 changed files with 8073 additions and 7875 deletions

View File

@@ -13,7 +13,7 @@ using namespace wpi;
Koors40::Koors40(int channel) : PWMMotorController("Koors40", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_20Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "Koors40");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMSparkFlex::PWMSparkFlex(int channel) : PWMMotorController("PWMSparkFlex", channel) {
SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "RevSparkFlexPWM");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMSparkMax::PWMSparkMax(int channel) : PWMMotorController("PWMSparkMax", channel) {
SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "RevSparkMaxPWM");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMTalonFX::PWMTalonFX(int channel) : PWMMotorController("PWMTalonFX", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "TalonFX");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMTalonSRX::PWMTalonSRX(int channel) : PWMMotorController("PWMTalonSRX", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "PWMTalonSRX");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMVenom::PWMVenom(int channel) : PWMMotorController("PWMVenom", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "FusionVenom");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
PWMVictorSPX::PWMVictorSPX(int channel) : PWMMotorController("PWMVictorSPX", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "PWMVictorSPX");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
Spark::Spark(int channel) : PWMMotorController("Spark", channel) {
SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "RevSPARK");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
SparkMini::SparkMini(int channel) : PWMMotorController("SparkMini", channel) {
SetBounds(2.5_ms, 1.51_ms, 1.5_ms, 1.49_ms, 0.5_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "RevSPARK");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
Talon::Talon(int channel) : PWMMotorController("Talon", channel) {
SetBounds(2.037_ms, 1.539_ms, 1.513_ms, 1.487_ms, 0.989_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "Talon");
}

View File

@@ -13,7 +13,7 @@ using namespace wpi;
VictorSP::VictorSP(int channel) : PWMMotorController("VictorSP", channel) {
SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
m_pwm.SetOutputPeriod(PWM::kOutputPeriod_5Ms);
SetSpeed(0.0);
SetDutyCycle(0.0);
HAL_ReportUsage("IO", GetChannel(), "VictorSP");
}