diff options
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index fa81418..76283e2 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -262,7 +262,12 @@ void WatchFaceDigital::Refresh() { if (heartbeat.IsUpdated() || heartbeatRunning.IsUpdated()) { if (heartbeatRunning.Get()) { lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xCE1B1B)); - lv_label_set_text_fmt(heartbeatValue, "%d", heartbeat.Get()); + auto v = heartbeat.Get(); + if (v) { + lv_label_set_text_fmt(heartbeatValue, "%d", v); + } else { + lv_label_set_text_static(heartbeatValue, ""); + } } else { lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x1B1B1B)); lv_label_set_text_static(heartbeatValue, ""); |
