[wpilib] Remove MotorController::StopMotor() (#8483)

It does the same thing as Disable() in practice, and MotorSafety has its
own StopMotor() function.
This commit is contained in:
Tyler Veness
2025-12-17 21:18:47 -08:00
committed by GitHub
parent a38499dcd7
commit 0349524f80
12 changed files with 6 additions and 54 deletions

View File

@@ -54,6 +54,10 @@ bool PWMMotorController::GetInverted() const {
void PWMMotorController::Disable() {
m_pwm.SetDisabled();
if (m_simSpeed) {
m_simSpeed.Set(0.0);
}
for (auto& follower : m_nonowningFollowers) {
follower->Disable();
}
@@ -63,19 +67,7 @@ void PWMMotorController::Disable() {
}
void PWMMotorController::StopMotor() {
// Don't use Set(0) as that will feed the watch kitty
m_pwm.SetPulseTime(0_us);
if (m_simSpeed) {
m_simSpeed.Set(0.0);
}
for (auto& follower : m_nonowningFollowers) {
follower->StopMotor();
}
for (auto& follower : m_owningFollowers) {
follower->StopMotor();
}
Disable();
}
std::string PWMMotorController::GetDescription() const {