Full sized map
Added toggle to expand the map across the entire onroad UI screen.
This commit is contained in:
@@ -269,6 +269,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"FrogPilotTogglesUpdated", PERSISTENT},
|
||||
{"FrogsGoMoo", PERSISTENT},
|
||||
{"FrogsGoMooTune", PERSISTENT},
|
||||
{"FullMap", PERSISTENT},
|
||||
{"GoatScream", PERSISTENT},
|
||||
{"LaneLinesWidth", PERSISTENT},
|
||||
{"LateralTune", PERSISTENT},
|
||||
|
||||
@@ -40,6 +40,7 @@ FrogPilotVisualsPanel::FrogPilotVisualsPanel(SettingsWindow *parent) : FrogPilot
|
||||
|
||||
{"QOLVisuals", "Quality of Life", "Miscellaneous quality of life changes to improve your overall openpilot experience.", "../frogpilot/assets/toggle_icons/quality_of_life.png"},
|
||||
{"DriveStats", "Drive Stats In Home Screen", "Display your device's drive stats in the home screen.", ""},
|
||||
{"FullMap", "Full Sized Map", "Maximize the size of the map in the onroad UI.", ""},
|
||||
};
|
||||
|
||||
for (const auto &[param, title, desc, icon] : visualToggles) {
|
||||
|
||||
@@ -33,7 +33,7 @@ private:
|
||||
std::set<QString> customOnroadUIKeys = {"AccelerationPath", "AdjacentPath", "BlindSpotPath", "FPSCounter", "LeadInfo"};
|
||||
std::set<QString> customThemeKeys = {"CustomColors", "CustomIcons", "CustomSignals", "CustomSounds"};
|
||||
std::set<QString> modelUIKeys = {"DynamicPathWidth", "LaneLinesWidth", "PathEdgeWidth", "PathWidth", "RoadEdgesWidth", "UnlimitedLength"};
|
||||
std::set<QString> qolKeys = {"DriveStats"};
|
||||
std::set<QString> qolKeys = {"DriveStats", "FullMap"};
|
||||
|
||||
std::map<std::string, ParamControl*> toggles;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ void OnroadWindow::updateState(const UIState &s) {
|
||||
Alert alert = Alert::get(*(s.sm), s.scene.started_frame);
|
||||
alerts->updateAlert(alert);
|
||||
|
||||
if (s.scene.map_on_left) {
|
||||
if (s.scene.map_on_left || scene.full_map) {
|
||||
split->setDirection(QBoxLayout::LeftToRight);
|
||||
} else {
|
||||
split->setDirection(QBoxLayout::RightToLeft);
|
||||
@@ -131,6 +131,11 @@ void OnroadWindow::mousePressEvent(QMouseEvent* e) {
|
||||
bool show_map = uiState()->scene.navigate_on_openpilot ? sidebarVisible : !sidebarVisible;
|
||||
if (!clickTimer.isActive()) {
|
||||
map->setVisible(show_map && !map->isVisible());
|
||||
if (scene.full_map) {
|
||||
map->setFixedWidth(width());
|
||||
} else {
|
||||
map->setFixedWidth(topWidget(this)->width() / 2 - UI_BORDER_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -342,7 +347,7 @@ void ExperimentalButton::paintEvent(QPaintEvent *event) {
|
||||
QPainter p(this);
|
||||
QPixmap img = experimental_mode ? experimental_img : engage_img;
|
||||
|
||||
if (!scene.show_driver_camera) {
|
||||
if (!(scene.show_driver_camera || scene.map_open && scene.full_map)) {
|
||||
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, QColor(0, 0, 0, 166), (isDown() || !(engageable || scene.always_on_lateral_active)) ? 0.6 : 1.0);
|
||||
}
|
||||
}
|
||||
@@ -416,7 +421,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
has_eu_speed_limit = (nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::VIENNA);
|
||||
is_metric = s.scene.is_metric;
|
||||
speedUnit = s.scene.is_metric ? tr("km/h") : tr("mph");
|
||||
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE || customSignals && (turnSignalLeft || turnSignalRight)) || showDriverCamera;
|
||||
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE || customSignals && (turnSignalLeft || turnSignalRight)) || fullMapOpen || showDriverCamera;
|
||||
status = s.status;
|
||||
|
||||
// update engageability/experimental mode button
|
||||
@@ -528,7 +533,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
||||
}
|
||||
|
||||
// current speed
|
||||
if (!showDriverCamera) {
|
||||
if (!(fullMapOpen || showDriverCamera)) {
|
||||
p.setFont(InterFont(176, QFont::Bold));
|
||||
drawText(p, rect().center().x(), 210, speedStr);
|
||||
p.setFont(InterFont(66));
|
||||
@@ -1027,13 +1032,14 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets(QPainter &p) {
|
||||
obstacleDistanceStock = scene.obstacle_distance_stock;
|
||||
|
||||
mapOpen = scene.map_open;
|
||||
fullMapOpen = mapOpen && scene.full_map;
|
||||
|
||||
showDriverCamera = scene.show_driver_camera;
|
||||
|
||||
turnSignalLeft = scene.turn_signal_left;
|
||||
turnSignalRight = scene.turn_signal_right;
|
||||
|
||||
if (!showDriverCamera) {
|
||||
if (!(showDriverCamera || fullMapOpen)) {
|
||||
if (leadInfo) {
|
||||
drawLeadInfo(p);
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ private:
|
||||
bool blindSpotRight;
|
||||
bool conditionalExperimental;
|
||||
bool experimentalMode;
|
||||
bool fullMapOpen;
|
||||
bool leadInfo;
|
||||
bool mapOpen;
|
||||
bool showDriverCamera;
|
||||
|
||||
@@ -320,6 +320,7 @@ void ui_update_frogpilot_params(UIState *s) {
|
||||
bool quality_of_life_controls = params.getBool("QOLControls");
|
||||
|
||||
bool quality_of_life_visuals = params.getBool("QOLVisuals");
|
||||
scene.full_map = quality_of_life_visuals && params.getBool("FullMap");
|
||||
}
|
||||
|
||||
void UIState::updateStatus() {
|
||||
|
||||
@@ -184,6 +184,7 @@ typedef struct UIScene {
|
||||
bool experimental_mode;
|
||||
bool experimental_mode_via_screen;
|
||||
bool fps_counter;
|
||||
bool full_map;
|
||||
bool lead_info;
|
||||
bool map_open;
|
||||
bool model_ui;
|
||||
|
||||
Reference in New Issue
Block a user