summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Motion.cpp
diff options
context:
space:
mode:
authorhubmartin <hub.martin@gmail.com>2021-08-29 11:43:50 +0200
committerhubmartin <hub.martin@gmail.com>2021-08-29 11:43:50 +0200
commit8390d0ef7243261675aab3a5c19862eb3fc53e68 (patch)
treea8429e8d2a455df8afe152197119075b5789e9fb /src/displayapp/screens/Motion.cpp
parent51c5257548efe678ec8e18d8cdea2476672f1238 (diff)
parent6c023785e53c507f7cb20703f5f3a221ea095068 (diff)
Merge branch 'develop' into pinmap
Diffstat (limited to 'src/displayapp/screens/Motion.cpp')
-rw-r--r--src/displayapp/screens/Motion.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/displayapp/screens/Motion.cpp b/src/displayapp/screens/Motion.cpp
index 43a5575e..2f1f7c21 100644
--- a/src/displayapp/screens/Motion.cpp
+++ b/src/displayapp/screens/Motion.cpp
@@ -36,13 +36,16 @@ Motion::Motion(Pinetime::Applications::DisplayApp* app, Controllers::MotionContr
labelStep = lv_label_create(lv_scr_act(), NULL);
lv_obj_align(labelStep, chart, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
lv_label_set_text(labelStep, "Steps ---");
+
+ taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
}
Motion::~Motion() {
+ lv_task_del(taskRefresh);
lv_obj_clean(lv_scr_act());
}
-bool Motion::Refresh() {
+void Motion::Refresh() {
lv_chart_set_next(chart, ser1, motionController.X());
lv_chart_set_next(chart, ser2, motionController.Y());
lv_chart_set_next(chart, ser3, motionController.Z());
@@ -55,6 +58,4 @@ bool Motion::Refresh() {
motionController.Y() / 0x10,
motionController.Z() / 0x10);
lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 10);
-
- return running;
}