Don't show "no gps" when ubloxd is not running (#1479)

* dont show no gps when ubloxd is not running

* Just s

* Dropped that

* Connected is too long
old-commit-hash: f7c8707bf8
commatwo_master
Willem Melching 5 years ago committed by GitHub
parent d7fcbc9c4b
commit 83d02c8c4a
  1. 15
      selfdrive/ui/sidebar.cc
  2. 1
      selfdrive/ui/ui.cc

@ -144,12 +144,17 @@ static void ui_draw_sidebar_panda_metric(UIState *s) {
panda_severity = 2; panda_severity = 2;
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "NO\nVEHICLE"); snprintf(panda_message_str, sizeof(panda_message_str), "%s", "NO\nVEHICLE");
} else { } else {
if (s->scene.satelliteCount < 6) { if (s->started){
panda_severity = 1; if (s->scene.satelliteCount < 6) {
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nNO GPS"); panda_severity = 1;
} else if (s->scene.satelliteCount >= 6) { snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nNO GPS");
} else if (s->scene.satelliteCount >= 6) {
panda_severity = 0;
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nGOOD GPS");
}
} else {
panda_severity = 0; panda_severity = 0;
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nGOOD GPS"); snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nONLINE");
} }
} }

@ -962,7 +962,6 @@ int main(int argc, char* argv[]) {
// Visiond process is just stopped, force a redraw to make screen blank again. // Visiond process is just stopped, force a redraw to make screen blank again.
if (!s->started) { if (!s->started) {
s->scene.satelliteCount = -1;
s->scene.uilayout_sidebarcollapsed = false; s->scene.uilayout_sidebarcollapsed = false;
update_offroad_layout_state(s); update_offroad_layout_state(s);
ui_draw(s); ui_draw(s);

Loading…
Cancel
Save