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:
parent
f8fb08e331
commit
b47d768de2
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user