enable colored warning for low battery

This commit is contained in:
dj2ls
2026-06-18 14:15:42 +02:00
parent c0293f7c69
commit 1f38990da1
+2 -3
View File
@@ -286,9 +286,8 @@ void LvStatusBar::refreshBattery() {
} else {
snprintf(buf, sizeof(buf), "%d%%", _battPct);
col = Theme::TEXT_PRIMARY;
// Future stuff, we can enable it, as soon as battery levels are working correctly
//if (_battPct <= 15) col = Theme::ERROR_CLR;
//else if (_battPct <= 30) col = Theme::WARNING_CLR;
if (_battPct <= 10) col = Theme::ERROR_CLR;
else if (_battPct <= 20) col = Theme::WARNING_CLR;
}
lv_label_set_text(_lblBatt, buf);
lv_obj_set_style_text_color(_lblBatt, lv_color_hex(col), 0);