mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
STM32 fix inverted pin mode
This commit is contained in:
parent
d367f5dc81
commit
7b77d4ce1e
|
@ -413,11 +413,9 @@ void MotorDriver::throttleInrush(bool on) {
|
||||||
// registered the pin in the pin to channel array
|
// registered the pin in the pin to channel array
|
||||||
}
|
}
|
||||||
#elif defined(ARDUINO_ARCH_STM32)
|
#elif defined(ARDUINO_ARCH_STM32)
|
||||||
if (invertBrake)
|
|
||||||
duty = 255-duty;
|
|
||||||
if(on) {
|
if(on) {
|
||||||
DCCTimer::DCCEXanalogWriteFrequency(brakePin, 7); // 7 means max
|
DCCTimer::DCCEXanalogWriteFrequency(brakePin, 7); // 7 means max
|
||||||
DCCTimer::DCCEXanalogWrite(brakePin,duty);
|
DCCTimer::DCCEXanalogWrite(brakePin,duty,invertBrake);
|
||||||
} else {
|
} else {
|
||||||
pinMode(brakePin, OUTPUT);
|
pinMode(brakePin, OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user