From 331fc2be6931238960c894d0a926f673607455fc Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 19 Jul 2021 17:06:20 +0300 Subject: [PATCH] Set remaining default periods to LV_DISP_DEF_REFR_PERIOD --- src/displayapp/screens/Music.cpp | 2 +- src/displayapp/screens/Paddle.cpp | 2 +- src/displayapp/screens/StopWatch.cpp | 2 +- src/displayapp/screens/Timer.cpp | 2 +- src/displayapp/screens/WatchFaceAnalog.cpp | 2 +- src/displayapp/screens/WatchFaceDigital.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/displayapp/screens/Music.cpp b/src/displayapp/screens/Music.cpp index beb96fae..2d228772 100644 --- a/src/displayapp/screens/Music.cpp +++ b/src/displayapp/screens/Music.cpp @@ -147,7 +147,7 @@ Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Mus musicService.event(Controllers::MusicService::EVENT_MUSIC_OPEN); - taskRefresh = lv_task_create(RefreshTaskCallback, 5000, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } Music::~Music() { diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp index 87fc8725..d43173dc 100644 --- a/src/displayapp/screens/Paddle.cpp +++ b/src/displayapp/screens/Paddle.cpp @@ -30,7 +30,7 @@ Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::Li lv_obj_set_style_local_radius(ball, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE); lv_obj_set_size(ball, ballSize, ballSize); - taskRefresh = lv_task_create(RefreshTaskCallback, 20, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } Paddle::~Paddle() { diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index 74b49db1..0d4feb20 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -101,7 +101,7 @@ StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask) lv_obj_align(lapTwoText, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 50, 55); lv_label_set_text(lapTwoText, ""); - taskRefresh = lv_task_create(RefreshTaskCallback, 20, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } StopWatch::~StopWatch() { diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index ae6ed30e..ff3099d5 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -74,7 +74,7 @@ Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) createButtons(); } - taskRefresh = lv_task_create(RefreshTaskCallback, 20, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); } Timer::~Timer() { diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp index b6720bd1..95c3fe46 100644 --- a/src/displayapp/screens/WatchFaceAnalog.cpp +++ b/src/displayapp/screens/WatchFaceAnalog.cpp @@ -119,7 +119,7 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app, lv_style_set_line_rounded(&hour_line_style_trace, LV_STATE_DEFAULT, false); lv_obj_add_style(hour_body_trace, LV_LINE_PART_MAIN, &hour_line_style_trace); - taskRefresh = lv_task_create(RefreshTaskCallback, 20, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); UpdateClock(); } diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 9b6aee23..e66e7aa9 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -101,7 +101,7 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app, lv_label_set_text(stepIcon, Symbols::shoe); lv_obj_align(stepIcon, stepValue, LV_ALIGN_OUT_LEFT_MID, -5, 0); - taskRefresh = lv_task_create(RefreshTaskCallback, 20, LV_TASK_PRIO_MID, this); + taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); Refresh(); }