diff --git a/selfdrive/ui/qt/onroad/annotated_camera.cc b/selfdrive/ui/qt/onroad/annotated_camera.cc index 1f2e491b1..ef0c74530 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.cc +++ b/selfdrive/ui/qt/onroad/annotated_camera.cc @@ -92,7 +92,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) { // hide map settings button for alerts and flip for right hand DM if (map_settings_btn->isEnabled()) { - map_settings_btn->setVisible(!hideBottomIcons && compass); + map_settings_btn->setVisible(!hideBottomIcons && compass && !hideMapIcon); main_layout->setAlignment(map_settings_btn, (rightHandDM ? Qt::AlignLeft : Qt::AlignRight) | Qt::AlignTop); } } @@ -876,6 +876,7 @@ void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &painter, const UISce experimentalMode = scene.experimental_mode; + hideMapIcon = scene.hide_map_icon; hideSpeed = scene.hide_speed; laneDetectionWidth = scene.lane_detection_width; @@ -893,7 +894,7 @@ void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &painter, const UISce bigMapOpen = mapOpen && scene.big_map; map_settings_btn_bottom->setEnabled(map_settings_btn->isEnabled()); if (map_settings_btn_bottom->isEnabled()) { - map_settings_btn_bottom->setVisible(!hideBottomIcons && !compass); + map_settings_btn_bottom->setVisible(!hideBottomIcons && !compass && !hideMapIcon); bottom_layout->setAlignment(map_settings_btn_bottom, rightHandDM ? Qt::AlignLeft : Qt::AlignRight); } diff --git a/selfdrive/ui/qt/onroad/annotated_camera.h b/selfdrive/ui/qt/onroad/annotated_camera.h index 50a0400a7..6962bb5dc 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.h +++ b/selfdrive/ui/qt/onroad/annotated_camera.h @@ -111,6 +111,7 @@ private: bool blindSpotRight; bool compass; bool experimentalMode; + bool hideMapIcon; bool hideSpeed; bool leadInfo; bool mapOpen; diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 546429c64..55a4a346b 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -427,6 +427,7 @@ void ui_update_frogpilot_params(UIState *s) { bool screen_management = params.getBool("ScreenManagement"); bool hide_ui_elements = screen_management && params.getBool("HideUIElements"); scene.hide_alerts = hide_ui_elements && params.getBool("HideAlerts"); + scene.hide_map_icon = hide_ui_elements && params.getBool("HideMapIcon"); scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController"); scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset"); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 7ff12e5ce..669476ad0 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -146,6 +146,7 @@ typedef struct UIScene { bool has_lead; bool hide_alerts; bool hide_lead_marker; + bool hide_map_icon; bool hide_speed; bool hide_speed_ui; bool holiday_themes;