1
0
Fork 0

Adjusted the firmware to display percent instead of gfx.

This commit is contained in:
panky-codes 2021-01-16 14:55:13 +01:00
parent dece6c6bc8
commit 11280d5f37

View file

@ -98,7 +98,8 @@ bool Clock::Refresh() {
batteryPercentRemaining = batteryController.PercentRemaining();
if (batteryPercentRemaining.IsUpdated()) {
auto batteryPercent = batteryPercentRemaining.Get();
lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent));
// lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent));
lv_label_set_text(batteryIcon, std::to_string(batteryPercent).c_str());
auto isCharging = batteryController.IsCharging() || batteryController.IsPowerPresent();
lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(isCharging));
}