1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-02-19 23:46:02 +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) { if (on) {
// toggle brake before turning power on - resets overcurrent error // toggle brake before turning power on - resets overcurrent error
// on the Pololu board if brake is wired to ^D2. // on the Pololu board if brake is wired to ^D2.
setBrake(true); // Yes, this is an ugly special case
setBrake(false); if (brakePin == 4 && invertBrake) {
setBrake(true);
setBrake(false);
}
setHIGH(fastPowerPin); setHIGH(fastPowerPin);
} }
else setLOW(fastPowerPin); else setLOW(fastPowerPin);