mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[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:
@@ -31,7 +31,7 @@ void PWMMotorController::Disable() {
|
||||
}
|
||||
|
||||
void PWMMotorController::StopMotor() {
|
||||
Disable();
|
||||
Set(0);
|
||||
}
|
||||
|
||||
std::string PWMMotorController::GetDescription() const {
|
||||
|
||||
Reference in New Issue
Block a user