Author: minacode <minamoto9@web.de>
cutout scaling hack
src/components/battery/BatteryController.cpp | 5 -----
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp index a207acda32c840467c34ad2dfdeb68e47b879fe1..a64ea0769c852a868c09b173e63102d2fafdf602 100644 --- a/src/components/battery/BatteryController.cpp +++ b/src/components/battery/BatteryController.cpp @@ -85,11 +85,6 @@ uint8_t newPercent = 100; if (!isFull) { newPercent = std::min(aprox.GetValue(voltage), isCharging ? uint8_t {99} : uint8_t {100}); } - // quick hack for better values - // rescale the percentages between 35 and 100 - constexpr uint8_t realMin = 35; - newPercent = std::max(newPercent, realMin); - newPercent = (newPercent - realMin) * 100 / (100 - realMin); if ((isPowerPresent && newPercent > percentRemaining) || (!isPowerPresent && newPercent < percentRemaining) || firstMeasurement) { firstMeasurement = false;