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/WatchFacePineTimeStyle.cpp | |
| parent | 248a6aea8771389cf733e89090096258e936f3b2 (diff) | |
Refactors watch faces. Replace lv_tick_get() with xTaskGetTickCount()
Diffstat (limited to 'src/displayapp/screens/WatchFacePineTimeStyle.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFacePineTimeStyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp index 22ccefc7..ce8f8f7e 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp +++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp @@ -407,7 +407,7 @@ bool WatchFacePineTimeStyle::OnTouchEvent(Pinetime::Applications::TouchEvents ev if ((event == Pinetime::Applications::TouchEvents::LongTap) && lv_obj_get_hidden(btnClose)) { lv_obj_set_hidden(btnSetColor, false); lv_obj_set_hidden(btnSetOpts, false); - savedTick = lv_tick_get(); + savedTick = xTaskGetTickCount(); return true; } if ((event == Pinetime::Applications::TouchEvents::DoubleTap) && (lv_obj_get_hidden(btnClose) == false)) { @@ -558,7 +558,7 @@ void WatchFacePineTimeStyle::Refresh() { } if (!lv_obj_get_hidden(btnSetColor)) { - if ((savedTick > 0) && (lv_tick_get() - savedTick > 3000)) { + if ((savedTick > 0) && (xTaskGetTickCount() - savedTick > pdMS_TO_TICKS(3000))) { lv_obj_set_hidden(btnSetColor, true); lv_obj_set_hidden(btnSetOpts, true); savedTick = 0; |
