mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
special treatment for Pololu board
This commit is contained in:
parent
34f3abedaf
commit
d248cccf81
|
@ -55,6 +55,12 @@ MotorDriver::MotorDriver(byte power_pin, byte signal_pin, byte signal_pin2, int8
|
|||
}
|
||||
|
||||
void MotorDriver::setPower(bool on) {
|
||||
if (brakePin == -4 && on) {
|
||||
// toggle brake before turning power on - resets overcurrent error
|
||||
// on the Pololu board if brake is wired to ^D2.
|
||||
setBrake(true);
|
||||
setBrake(false);
|
||||
}
|
||||
WritePin(powerPin, on ? HIGH : LOW);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user