diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 2e4acc1..8e7896a 100755 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -116,7 +116,7 @@ void update_model(UIState *s, if (paramsMemory.getInt("no_lat_lane_change")) { path = LANE_CHANGE_NO_LAT_PATH_WIDTH; } - path = CENTER_PATH_WIDTH; + path = CENTER_LANE_WIDTH; } auto lead_count = model.getLeadsV3().size(); @@ -127,6 +127,7 @@ void update_model(UIState *s, max_distance = std::clamp((float)(lead_d - fmin(lead_d * 0.35, 10.)), 0.0f, max_distance); } } + max_idx = get_path_length_idx(plan_position, max_distance); update_line_data(s, plan_position, scene.model_ui ? path * (1 - scene.path_edge_width / 100) : 0.9, 1.22, &scene.track_vertices, max_idx, false); @@ -359,8 +360,8 @@ void ui_update_frogpilot_params(UIState *s) { scene.lane_line_width = params.getInt("LaneLinesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f; // CLEARPILOT - either disable these options, or set them as defaults and restore them scene.path_edge_width = params.getInt("PathEdgeWidth"); - // scene.path_edge_width = /* params.getInt("PathEdgeWidth"); */ EDGE_PATH_WIDTH; - scene.path_width = /* params.getInt("PathWidth") */ CENTER_PATH_WIDTH / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f; + // scene.path_edge_width = /* params.getInt("PathEdgeWidth"); */ OTHER_LANE_WIDTH; + scene.path_width = /* params.getInt("PathWidth") */ CENTER_LANE_WIDTH / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f; scene.road_edge_width = params.getInt("RoadEdgesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f; scene.unlimited_road_ui_length = scene.model_ui && params.getBool("UnlimitedLength");