Visuals - Model UI - Hide Lead Marker

Hide the lead marker from the onroad UI.
This commit is contained in:
FrogAi 2024-05-12 00:27:49 -07:00
parent c71a12f56f
commit d3c406964f
3 changed files with 3 additions and 1 deletions

View File

@ -613,7 +613,7 @@ void AnnotatedCameraWidget::paintGL() {
update_model(s, model, sm["uiPlan"].getUiPlan());
drawLaneLines(painter, s, v_ego);
if (s->scene.longitudinal_control && sm.rcv_frame("modelV2") > s->scene.started_frame) {
if (s->scene.longitudinal_control && sm.rcv_frame("modelV2") > s->scene.started_frame && !s->scene.hide_lead_marker) {
update_leads(s, model);
float prev_drel = -1;
for (int i = 0; i < model.getLeadsV3().size() && i < 2; i++) {

View File

@ -402,6 +402,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");
bool quality_of_life_controls = params.getBool("QOLControls");
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");

View File

@ -142,6 +142,7 @@ typedef struct UIScene {
bool fahrenheit;
bool has_auto_tune;
bool has_lead;
bool hide_lead_marker;
bool holiday_themes;
bool is_CPU;
bool is_GPU;