From 9fb35cc073452d20a8c106693d86ffd332a85032 Mon Sep 17 00:00:00 2001 From: Steve Amor Date: Fri, 28 Feb 2025 19:15:29 +0000 Subject: Refactors watch faces. Replace lv_tick_get() with xTaskGetTickCount() --- src/displayapp/screens/WatchFaceInfineat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/displayapp/screens/WatchFaceInfineat.cpp') diff --git a/src/displayapp/screens/WatchFaceInfineat.cpp b/src/displayapp/screens/WatchFaceInfineat.cpp index 40f2abbb..c7939711 100644 --- a/src/displayapp/screens/WatchFaceInfineat.cpp +++ b/src/displayapp/screens/WatchFaceInfineat.cpp @@ -316,7 +316,7 @@ WatchFaceInfineat::~WatchFaceInfineat() { bool WatchFaceInfineat::OnTouchEvent(Pinetime::Applications::TouchEvents event) { if ((event == Pinetime::Applications::TouchEvents::LongTap) && lv_obj_get_hidden(btnSettings)) { lv_obj_set_hidden(btnSettings, false); - savedTick = lv_tick_get(); + savedTick = xTaskGetTickCount(); return true; } // Prevent screen from sleeping when double tapping with settings on @@ -463,7 +463,7 @@ void WatchFaceInfineat::Refresh() { } if (!lv_obj_get_hidden(btnSettings)) { - if ((savedTick > 0) && (lv_tick_get() - savedTick > 3000)) { + if ((savedTick > 0) && (xTaskGetTickCount() - savedTick > pdMS_TO_TICKS(3000))) { lv_obj_set_hidden(btnSettings, true); savedTick = 0; } -- cgit v1.2.3-70-g09d2