summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/WatchFaceDigital.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 2204e17..2dd89bb 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -240,9 +240,13 @@ bool WatchFaceDigital::Refresh() {
}
stepCount = motionController.NbSteps();
- if(stepCount.IsUpdated()) {
+ motionSensorOk = motionController.IsSensorOk();
+ if(stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
char stepBuffer[5];
- sprintf(stepBuffer, "%lu", stepCount.Get());
+ if(motionSensorOk.Get())
+ sprintf(stepBuffer, "%lu", stepCount.Get());
+ else
+ sprintf(stepBuffer, "---", stepCount.Get());
lv_label_set_text(stepValue, stepBuffer);
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, -5, -2);
lv_obj_align(stepIcon, stepValue, LV_ALIGN_OUT_LEFT_MID, -5, 0);