From 1fe3210263351d204b82f1713d98c5e095477fb3 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" <5425387+Ralim@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:33:23 +1000 Subject: [PATCH] Fix startup current pulse on some devices Always force power to 0 if <= to handle vin not yet stable at boot --- source/Core/Src/power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Src/power.cpp b/source/Core/Src/power.cpp index e7037882..2fcc120b 100644 --- a/source/Core/Src/power.cpp +++ b/source/Core/Src/power.cpp @@ -62,7 +62,7 @@ uint32_t availableW10(uint8_t sample) { } uint8_t X10WattsToPWM(int32_t x10Watts, uint8_t sample) { // Scale input x10Watts to the pwm range available - if (x10Watts < 0) { + if (x10Watts <= 0) { // keep the battery voltage updating the filter getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), sample); return 0;