ui, fix vision_seen when starting with camerad already running

old-commit-hash: 99949cc27db23662bb97747ce911a99829e9cc15
This commit is contained in:
Willem Melching
2020-06-23 15:16:55 -07:00
parent 9bca4bfb20
commit 31e0931cee
+4 -4
View File
@@ -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) {