diff --git a/selfdrive/ui/qt/maps/map_panel.cc b/selfdrive/ui/qt/maps/map_panel.cc index c4cc20e..1044cc0 100644 --- a/selfdrive/ui/qt/maps/map_panel.cc +++ b/selfdrive/ui/qt/maps/map_panel.cc @@ -41,3 +41,8 @@ void MapPanel::toggleMapSettings() { emit mapPanelRequested(); show(); } + +void MapPanel::setVisible(bool visible) { + QFrame::setVisible(visible); + uiState()->scene.map_open = visible; +} diff --git a/selfdrive/ui/qt/maps/map_panel.h b/selfdrive/ui/qt/maps/map_panel.h index 190bb63..ed287b1 100644 --- a/selfdrive/ui/qt/maps/map_panel.h +++ b/selfdrive/ui/qt/maps/map_panel.h @@ -9,6 +9,7 @@ class MapPanel : public QFrame { public: explicit MapPanel(const QMapLibre::Settings &settings, QWidget *parent = nullptr); + void setVisible(bool visible); signals: void mapPanelRequested(); diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 75b3117..ba1748c 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -859,6 +859,8 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets(QPainter &p) { experimentalMode = scene.experimental_mode; + mapOpen = scene.map_open; + turnSignalLeft = scene.turn_signal_left; turnSignalRight = scene.turn_signal_right; @@ -950,7 +952,7 @@ void AnnotatedCameraWidget::drawStatusBar(QPainter &p) { // Update status text if (alwaysOnLateralActive) { - newStatus = QString("Always On Lateral active. Press the \"Cruise Control\" button to disable"); + newStatus = QString("Always On Lateral active") + (mapOpen ? "" : ". Press the \"Cruise Control\" button to disable"); } else if (conditionalExperimental) { newStatus = conditionalStatusMap[status != STATUS_DISENGAGED ? conditionalStatus : 0]; } diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index b4f1fce..664d219 100644 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -125,6 +125,7 @@ private: bool blindSpotRight; bool conditionalExperimental; bool experimentalMode; + bool mapOpen; bool turnSignalLeft; bool turnSignalRight; diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index bf0eea9..e8ce438 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -179,6 +179,7 @@ typedef struct UIScene { bool dynamic_path_width; bool enabled; bool experimental_mode; + bool map_open; bool model_ui; bool turn_signal_left; bool turn_signal_right;