Adjusted the firmware to display percent instead of gfx.
This commit is contained in:
parent
dece6c6bc8
commit
11280d5f37
|
@ -98,7 +98,8 @@ bool Clock::Refresh() {
|
||||||
batteryPercentRemaining = batteryController.PercentRemaining();
|
batteryPercentRemaining = batteryController.PercentRemaining();
|
||||||
if (batteryPercentRemaining.IsUpdated()) {
|
if (batteryPercentRemaining.IsUpdated()) {
|
||||||
auto batteryPercent = batteryPercentRemaining.Get();
|
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();
|
auto isCharging = batteryController.IsCharging() || batteryController.IsPowerPresent();
|
||||||
lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(isCharging));
|
lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(isCharging));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user