diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index ec690eeea0..15dc33617a 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -144,7 +144,7 @@ static void update_model(UIState *s, const cereal::ModelDataV2::Reader &model) { } // update path - const float lead_d = s->sm->updated("radarState") ? scene.lead_data[0].getDRel() * 2. : MAX_DRAW_DISTANCE; + const float lead_d = scene.lead_data[0].getStatus() ? scene.lead_data[0].getDRel() * 2. : MAX_DRAW_DISTANCE; float path_length = (lead_d > 0.) ? lead_d - fmin(lead_d * 0.35, 10.) : MAX_DRAW_DISTANCE; path_length = fmin(path_length, max_distance); update_line_data(s, model.getPosition(), 0.5, 0, &scene.track_vertices, path_length);