mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[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:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user