From 31e0931ceea23516abc063e92eac86a1a8b3b742 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 23 Jun 2020 15:16:55 -0700 Subject: [PATCH] ui, fix vision_seen when starting with camerad already running old-commit-hash: 99949cc27db23662bb97747ce911a99829e9cc15 --- selfdrive/ui/ui.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index f352adf699..d622d61563 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -198,6 +198,9 @@ static void ui_init(UIState *s) { s->pm = new PubMaster({"offroadLayout"}); s->ipc_fd = -1; + s->scene.satelliteCount = -1; + s->started = false; + s->vision_seen = false; // init display s->fb = framebuffer_init("ui", 0, true, &s->fb_w, &s->fb_h); @@ -734,6 +737,7 @@ int main(int argc, char* argv[]) { UIState uistate = {}; UIState *s = &uistate; ui_init(s); + enable_event_processing(true); pthread_t connect_thread_handle; @@ -774,10 +778,6 @@ int main(int argc, char* argv[]) { int draws = 0; - s->scene.satelliteCount = -1; - s->started = false; - s->vision_seen = false; - while (!do_exit) { bool should_swap = false; if (!s->started) {