diff options
| author | Steve Amor <steveamor@users.noreply.github.com> | 2025-02-28 19:15:29 +0000 |
|---|---|---|
| committer | mark9064 <30447455+mark9064@users.noreply.github.com> | 2025-05-23 17:46:14 +0100 |
| commit | 9fb35cc073452d20a8c106693d86ffd332a85032 (patch) | |
| tree | b373dbbab6c83c7a1c08181a2d2896e97060530a /src/displayapp/screens/WatchFaceInfineat.cpp | |
| parent | 248a6aea8771389cf733e89090096258e936f3b2 (diff) | |
Refactors watch faces. Replace lv_tick_get() with xTaskGetTickCount()
Diffstat (limited to 'src/displayapp/screens/WatchFaceInfineat.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceInfineat.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
