[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)

Fixes #8716.
This commit is contained in:
Tyler Veness
2026-04-09 22:28:01 -07:00
committed by GitHub
parent a4e035ba64
commit b6849a8da3
160 changed files with 659 additions and 706 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(20_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(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(5_ms);
SetDutyCycle(0.0);
SetThrottle(0.0);
HAL_ReportUsage("IO", GetChannel(), "VictorSP");
}