1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

DC power fix

This commit is contained in:
Asbelos
2022-03-31 22:19:13 +01:00
parent f9e36e6693
commit ece342f037
3 changed files with 48 additions and 26 deletions

View File

@@ -97,10 +97,6 @@ bool MotorDriver::isPWMCapable() {
void MotorDriver::setPower(POWERMODE mode) {
bool on=mode==POWERMODE::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);
IODevice::write(powerPin,HIGH);
}
else IODevice::write(powerPin,LOW);