From aa00a9eccb683e5d03e13f4751d00929aa199597 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 10 Sep 2023 13:45:40 -0400 Subject: [PATCH] Injector DutyCycle jumps to 0 when duty goes beyond 127.5% fix #5559 --- firmware/console/status_loop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 29967c7e64..b029a364e8 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -639,7 +639,7 @@ DcHardware *getdcHardware(); // 68 // 140 #if EFI_ENGINE_CONTROL - tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm); + tsOutputChannels->injectorDutyCycle = minF(/*let's avoid scaled "uint8_t, 2" overflow*/127, getInjectorDutyCycle(rpm)); #endif // 224