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:
parent
2c1b3e0a8f
commit
ac4af407aa
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user