diff --git a/apk/ai.comma.plus.offroad.apk b/apk/ai.comma.plus.offroad.apk index 2a2de95bb5..38aea35ae7 100644 --- a/apk/ai.comma.plus.offroad.apk +++ b/apk/ai.comma.plus.offroad.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b19831e278e17ccecd1af02d8cab1f523dc5d4bb5056c5c7aa1c05d9157f515 -size 13691048 +oid sha256:b6d3698d82870268439609527eea6b350dc65f5ddacbb12120ba2ef5351c2dc4 +size 13691663 diff --git a/apks b/apks index 25e8e25624..e4bf49bc65 160000 --- a/apks +++ b/apks @@ -1 +1 @@ -Subproject commit 25e8e25624365d244a1aa70e6b96a09db514242d +Subproject commit e4bf49bc65e8e680e5afc629240b4ebbcedc4ebd diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index ca69c44417..f3e62e1fb2 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -203,6 +203,15 @@ static int read_param_uint64_timeout(uint64_t* dest, const char* param_name, int } } +static void update_offroad_layout_timeout(UIState *s, int* timeout) { + if (*timeout > 0) { + (*timeout)--; + } else { + update_offroad_layout_state(s); + *timeout = 2 * UI_FREQ; + } +} + static void ui_init(UIState *s) { memset(s, 0, sizeof(UIState)); @@ -1072,6 +1081,8 @@ int main(int argc, char* argv[]) { } else { s->scene.athenaStatus = NET_ERROR; } + update_offroad_layout_timeout(s, &s->offroad_layout_timeout); + pthread_mutex_unlock(&s->lock); // the bg thread needs to be scheduled, so the main thread needs time without the lock diff --git a/selfdrive/ui/ui.hpp b/selfdrive/ui/ui.hpp index f0c957768a..b06b51c62b 100644 --- a/selfdrive/ui/ui.hpp +++ b/selfdrive/ui/ui.hpp @@ -264,6 +264,7 @@ typedef struct UIState { int limit_set_speed_timeout; int hardware_timeout; int last_athena_ping_timeout; + int offroad_layout_timeout; bool controls_seen;