offroad/ui: Fix layout bugs (offroad drawing on top, settings open after drive)

old-commit-hash: 76052865cd
commatwo_master
andyh2 5 years ago
parent 15916d03f4
commit f7e3d8349d
  1. 4
      apk/ai.comma.plus.offroad.apk
  2. 2
      apks
  3. 11
      selfdrive/ui/ui.cc
  4. 1
      selfdrive/ui/ui.hpp

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b19831e278e17ccecd1af02d8cab1f523dc5d4bb5056c5c7aa1c05d9157f515
size 13691048
oid sha256:b6d3698d82870268439609527eea6b350dc65f5ddacbb12120ba2ef5351c2dc4
size 13691663

@ -1 +1 @@
Subproject commit 25e8e25624365d244a1aa70e6b96a09db514242d
Subproject commit e4bf49bc65e8e680e5afc629240b4ebbcedc4ebd

@ -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

@ -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;

Loading…
Cancel
Save