mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-08 09:45:54 +08:00
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:
+2
-1
@@ -97,7 +97,7 @@ void update_model(UIState *s,
|
|||||||
int max_idx = get_path_length_idx(lane_lines[0], max_distance);
|
int max_idx = get_path_length_idx(lane_lines[0], max_distance);
|
||||||
for (int i = 0; i < std::size(scene.lane_line_vertices); i++) {
|
for (int i = 0; i < std::size(scene.lane_line_vertices); i++) {
|
||||||
scene.lane_line_probs[i] = lane_line_probs[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
|
// update road edges
|
||||||
@@ -403,6 +403,7 @@ void ui_update_frogpilot_params(UIState *s, Params ¶ms) {
|
|||||||
scene.model_ui = params.getBool("ModelUI");
|
scene.model_ui = params.getBool("ModelUI");
|
||||||
scene.dynamic_path_width = scene.model_ui && params.getBool("DynamicPathWidth");
|
scene.dynamic_path_width = scene.model_ui && params.getBool("DynamicPathWidth");
|
||||||
scene.hide_lead_marker = scene.model_ui && params.getBool("HideLeadMarker");
|
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");
|
bool quality_of_life_controls = params.getBool("QOLControls");
|
||||||
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ typedef struct UIScene {
|
|||||||
float adjusted_cruise;
|
float adjusted_cruise;
|
||||||
float friction;
|
float friction;
|
||||||
float lane_detection_width;
|
float lane_detection_width;
|
||||||
|
float lane_line_width;
|
||||||
float lane_width_left;
|
float lane_width_left;
|
||||||
float lane_width_right;
|
float lane_width_right;
|
||||||
float lat_accel;
|
float lat_accel;
|
||||||
|
|||||||
Reference in New Issue
Block a user