[wpilib] Call set(0) rather than disable for stopMotor (#4763)

For PWM motor controllers, this is going to be the fastest way to stop the motor,
as disabling the PWM output will have a small delay due to the motor controller
needing to detect the missing signal.

Note Set(0) is not a safe approach for CAN motor controllers, which may have closed
loop operation, non-% output set() calls, etc.
This commit is contained in:
Ryan Blue
2022-12-05 16:33:54 -05:00
committed by GitHub
parent c9dea2968d
commit 6789869663
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ void PWMMotorController::Disable() {
}
void PWMMotorController::StopMotor() {
Disable();
Set(0);
}
std::string PWMMotorController::GetDescription() const {