1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-02-17 06:29:15 +01:00

only on pololu board this makes sense

This commit is contained in:
Harald Barth 2021-08-29 23:47:01 +02:00
parent f8fb08e331
commit b47d768de2

View File

@ -89,8 +89,11 @@ void MotorDriver::setPower(bool on) {
if (on) {
// toggle brake before turning power on - resets overcurrent error
// on the Pololu board if brake is wired to ^D2.
setBrake(true);
setBrake(false);
// Yes, this is an ugly special case
if (brakePin == 4 && invertBrake) {
setBrake(true);
setBrake(false);
}
setHIGH(fastPowerPin);
}
else setLOW(fastPowerPin);