Show plug icon while plugged in

This commit is contained in:
Riku Isokoski
2021-09-22 13:58:45 +03:00
parent b210090837
commit 980ac17388
3 changed files with 5 additions and 5 deletions

View File

@@ -102,9 +102,9 @@ WatchFaceDigital::~WatchFaceDigital() {
}
void WatchFaceDigital::Refresh() {
isCharging = batteryController.IsCharging();
if (isCharging.IsUpdated()) {
lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(isCharging.Get()));
powerPresent = batteryController.IsPowerPresent();
if (powerPresent.IsUpdated()) {
lv_label_set_text(batteryPlug, BatteryIcon::GetPlugIcon(powerPresent.Get()));
}
batteryPercentRemaining = batteryController.PercentRemaining();

View File

@@ -44,7 +44,7 @@ namespace Pinetime {
uint8_t currentDay = 0;
DirtyValue<uint8_t> batteryPercentRemaining {};
DirtyValue<bool> isCharging {};
DirtyValue<bool> powerPresent {};
DirtyValue<bool> bleState {};
DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {};
DirtyValue<bool> motionSensorOk {};