Detect if the map is open
This commit is contained in:
parent
3751e9fd84
commit
6093345711
|
@ -41,3 +41,8 @@ void MapPanel::toggleMapSettings() {
|
|||
emit mapPanelRequested();
|
||||
show();
|
||||
}
|
||||
|
||||
void MapPanel::setVisible(bool visible) {
|
||||
QFrame::setVisible(visible);
|
||||
uiState()->scene.map_open = visible;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ private:
|
|||
bool blindSpotRight;
|
||||
bool conditionalExperimental;
|
||||
bool experimentalMode;
|
||||
bool mapOpen;
|
||||
bool turnSignalLeft;
|
||||
bool turnSignalRight;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue