Update src/displayapp/screens/WatchFaceTerminal.cpp

Co-authored-by: NeroBurner <pyro4hell@gmail.com>
This commit is contained in:
Марков Дмитрий 2022-02-02 09:02:51 +05:00 committed by GitHub
parent bba34f69bf
commit 6853166cf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,12 @@ WatchFaceTerminal::~WatchFaceTerminal() {
lv_obj_clean(lv_scr_act());
}
void WatchFaceTerminal::Refresh() {
void WatchFaceTerminal::Refresh() {
powerPresent = batteryController.IsPowerPresent();
if (powerPresent.IsUpdated()) {
lv_label_set_text_static(batteryPlug, BatteryIcon::GetPlugIcon(powerPresent.Get()));
}
batteryPercentRemaining = batteryController.PercentRemaining();
if (batteryPercentRemaining.IsUpdated()) {
auto batteryPercent = batteryPercentRemaining.Get();