mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
FrogPilot setup - Determine if the map is open
This commit is contained in:
@@ -41,3 +41,11 @@ void MapPanel::toggleMapSettings() {
|
||||
emit mapPanelRequested();
|
||||
show();
|
||||
}
|
||||
|
||||
void MapPanel::showEvent(QShowEvent *event) {
|
||||
uiState()->scene.map_open = true;
|
||||
}
|
||||
|
||||
void MapPanel::hideEvent(QHideEvent *event) {
|
||||
uiState()->scene.map_open = false;
|
||||
}
|
||||
|
||||
@@ -18,4 +18,8 @@ public slots:
|
||||
|
||||
private:
|
||||
QStackedLayout *content_stack;
|
||||
|
||||
// FrogPilot widgets
|
||||
void hideEvent(QHideEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
};
|
||||
|
||||
@@ -101,6 +101,10 @@ typedef struct UIScene {
|
||||
bool started, ignition, is_metric, map_on_left, longitudinal_control;
|
||||
bool world_objects_visible = false;
|
||||
uint64_t started_frame;
|
||||
|
||||
// FrogPilot variables
|
||||
bool map_open;
|
||||
|
||||
} UIScene;
|
||||
|
||||
class UIState : public QObject {
|
||||
|
||||
Reference in New Issue
Block a user