Detect if the map is open
This commit is contained in:
@@ -41,3 +41,8 @@ void MapPanel::toggleMapSettings() {
|
|||||||
emit mapPanelRequested();
|
emit mapPanelRequested();
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapPanel::setVisible(bool visible) {
|
||||||
|
QFrame::setVisible(visible);
|
||||||
|
uiState()->scene.map_open = visible;
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class MapPanel : public QFrame {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MapPanel(const QMapLibre::Settings &settings, QWidget *parent = nullptr);
|
explicit MapPanel(const QMapLibre::Settings &settings, QWidget *parent = nullptr);
|
||||||
|
void setVisible(bool visible);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void mapPanelRequested();
|
void mapPanelRequested();
|
||||||
|
|||||||
@@ -859,6 +859,8 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets(QPainter &p) {
|
|||||||
|
|
||||||
experimentalMode = scene.experimental_mode;
|
experimentalMode = scene.experimental_mode;
|
||||||
|
|
||||||
|
mapOpen = scene.map_open;
|
||||||
|
|
||||||
turnSignalLeft = scene.turn_signal_left;
|
turnSignalLeft = scene.turn_signal_left;
|
||||||
turnSignalRight = scene.turn_signal_right;
|
turnSignalRight = scene.turn_signal_right;
|
||||||
|
|
||||||
@@ -950,7 +952,7 @@ void AnnotatedCameraWidget::drawStatusBar(QPainter &p) {
|
|||||||
|
|
||||||
// Update status text
|
// Update status text
|
||||||
if (alwaysOnLateralActive) {
|
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) {
|
} else if (conditionalExperimental) {
|
||||||
newStatus = conditionalStatusMap[status != STATUS_DISENGAGED ? conditionalStatus : 0];
|
newStatus = conditionalStatusMap[status != STATUS_DISENGAGED ? conditionalStatus : 0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ private:
|
|||||||
bool blindSpotRight;
|
bool blindSpotRight;
|
||||||
bool conditionalExperimental;
|
bool conditionalExperimental;
|
||||||
bool experimentalMode;
|
bool experimentalMode;
|
||||||
|
bool mapOpen;
|
||||||
bool turnSignalLeft;
|
bool turnSignalLeft;
|
||||||
bool turnSignalRight;
|
bool turnSignalRight;
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ typedef struct UIScene {
|
|||||||
bool dynamic_path_width;
|
bool dynamic_path_width;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
bool experimental_mode;
|
bool experimental_mode;
|
||||||
|
bool map_open;
|
||||||
bool model_ui;
|
bool model_ui;
|
||||||
bool turn_signal_left;
|
bool turn_signal_left;
|
||||||
bool turn_signal_right;
|
bool turn_signal_right;
|
||||||
|
|||||||
Reference in New Issue
Block a user