Visuals - Model UI - Lane Lines

Adjust the visual thickness of lane lines on your display.

Default matches the MUTCD average of 4 inches.
This commit is contained in:
FrogAi 2024-05-11 14:53:59 -07:00
parent d3c406964f
commit ca10ff1ee1
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,7 @@ void update_model(UIState *s,
int max_idx = get_path_length_idx(lane_lines[0], max_distance);
for (int i = 0; i < std::size(scene.lane_line_vertices); i++) {
scene.lane_line_probs[i] = lane_line_probs[i];
update_line_data(s, lane_lines[i], 0.025 * scene.lane_line_probs[i], 0, &scene.lane_line_vertices[i], max_idx);
update_line_data(s, lane_lines[i], (scene.model_ui ? scene.lane_line_width : 0.025) * scene.lane_line_probs[i], 0, &scene.lane_line_vertices[i], max_idx);
}
// update road edges
@ -403,6 +403,7 @@ void ui_update_frogpilot_params(UIState *s, Params &params) {
scene.model_ui = params.getBool("ModelUI");
scene.dynamic_path_width = scene.model_ui && params.getBool("DynamicPathWidth");
scene.hide_lead_marker = scene.model_ui && params.getBool("HideLeadMarker");
scene.lane_line_width = params.getInt("LaneLinesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f;
bool quality_of_life_controls = params.getBool("QOLControls");
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");

View File

@ -204,6 +204,7 @@ typedef struct UIScene {
float adjusted_cruise;
float friction;
float lane_detection_width;
float lane_line_width;
float lane_width_left;
float lane_width_right;
float lat_accel;