1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 21:21:24 +01:00

On ESP32, the inversion is already done in HW

This commit is contained in:
Harald Barth 2023-11-21 22:47:48 +01:00
parent 2c1b3e0a8f
commit ac4af407aa

View File

@ -156,8 +156,10 @@ class MotorDriver {
// from outside interrupt // from outside interrupt
void setBrake( bool on, bool interruptContext=false); void setBrake( bool on, bool interruptContext=false);
__attribute__((always_inline)) inline void setSignal( bool high) { __attribute__((always_inline)) inline void setSignal( bool high) {
#ifndef ARDUINO_ARCH_ESP32
if (invertPhase) if (invertPhase)
high = !high; high = !high;
#endif
if (trackPWM) { if (trackPWM) {
DCCTimer::setPWM(signalPin,high); DCCTimer::setPWM(signalPin,high);
} }