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

ESP32 rewrite PWM LEDC inrush duty fix

This commit is contained in:
Harald Barth
2024-04-05 01:10:10 +02:00
parent fdc956576b
commit 6d7d2325da
3 changed files with 4 additions and 4 deletions

View File

@@ -411,7 +411,7 @@ void MotorDriver::throttleInrush(bool on) {
duty = 255-duty;
#if defined(ARDUINO_ARCH_ESP32)
if(on) {
DCCTimer::DCCEXInrushControlOn(brakePin);
DCCTimer::DCCEXInrushControlOn(brakePin, duty);
} else {
ledcDetachPin(brakePin); // not DCCTimer::DCCEXledcDetachPin() as we have not
// registered the pin in the pin to channel array