From 6a81f92efdecd55288c915ba5cd36ca781b71494 Mon Sep 17 00:00:00 2001 From: PlayDay <18056374+playday3008@users.noreply.github.com> Date: Mon, 8 Mar 2021 12:12:20 +0100 Subject: [PATCH] Update GUIThread.cpp --- source/Core/Threads/GUIThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 0a04b2f3..3c3776c8 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -163,8 +163,8 @@ static void gui_drawBatteryIcon() { if (cellV < systemSettings.minVoltageCells) cellV = systemSettings.minVoltageCells; cellV -= systemSettings.minVoltageCells; // Should leave us a number of 0-9 - if (cellV > (uint32_t)(42 - systemSettings.minVoltageCells)) - cellV = 42 - systemSettings.minVoltageCells; + if (cellV > 9) + cellV = 9; OLED::drawBattery(cellV + 1); } else { OLED::drawSymbol(15); // Draw the DC Logo