Visuals - Quality of Life - Big Map
Increase the size of the map in the onroad UI.
This commit is contained in:
parent
40abf95416
commit
ad1a65786e
@ -174,6 +174,11 @@ void OnroadWindow::mousePressEvent(QMouseEvent* e) {
|
|||||||
bool sidebarVisible = geometry().x() > 0;
|
bool sidebarVisible = geometry().x() > 0;
|
||||||
bool show_map = uiState()->scene.navigate_on_openpilot ? sidebarVisible : !sidebarVisible;
|
bool show_map = uiState()->scene.navigate_on_openpilot ? sidebarVisible : !sidebarVisible;
|
||||||
map->setVisible(show_map && !map->isVisible());
|
map->setVisible(show_map && !map->isVisible());
|
||||||
|
if (scene.big_map) {
|
||||||
|
map->setFixedWidth(width());
|
||||||
|
} else {
|
||||||
|
map->setFixedWidth(topWidget(this)->width() / 2 - UI_BORDER_SIZE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// propagation event to parent(HomeWindow)
|
// propagation event to parent(HomeWindow)
|
||||||
@ -598,10 +603,12 @@ void ExperimentalButton::paintEvent(QPaintEvent *event) {
|
|||||||
(scene.navigate_on_openpilot ? bg_colors[STATUS_NAVIGATION_ACTIVE] : QColor(0, 0, 0, 166)))))) :
|
(scene.navigate_on_openpilot ? bg_colors[STATUS_NAVIGATION_ACTIVE] : QColor(0, 0, 0, 166)))))) :
|
||||||
QColor(0, 0, 0, 166);
|
QColor(0, 0, 0, 166);
|
||||||
|
|
||||||
if (wheelIconGif != 0) {
|
if (!(scene.map_open && scene.big_map)) {
|
||||||
drawIconGif(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), *gif, background_color, 1.0);
|
if (wheelIconGif != 0) {
|
||||||
} else {
|
drawIconGif(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), *gif, background_color, 1.0);
|
||||||
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || !engageable) ? 0.6 : 1.0, steeringAngleDeg);
|
} else {
|
||||||
|
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || !engageable) ? 0.6 : 1.0, steeringAngleDeg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -690,7 +697,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
|||||||
has_eu_speed_limit = (nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::VIENNA) && !(speedLimitController && !useViennaSLCSign) || (speedLimitController && useViennaSLCSign);
|
has_eu_speed_limit = (nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::VIENNA) && !(speedLimitController && !useViennaSLCSign) || (speedLimitController && useViennaSLCSign);
|
||||||
is_metric = s.scene.is_metric;
|
is_metric = s.scene.is_metric;
|
||||||
speedUnit = s.scene.is_metric ? tr("km/h") : tr("mph");
|
speedUnit = s.scene.is_metric ? tr("km/h") : tr("mph");
|
||||||
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE || customSignals != 0 && (turnSignalLeft || turnSignalRight));
|
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE || customSignals != 0 && (turnSignalLeft || turnSignalRight) || bigMapOpen);
|
||||||
status = s.status;
|
status = s.status;
|
||||||
|
|
||||||
// update engageability/experimental mode button
|
// update engageability/experimental mode button
|
||||||
@ -842,10 +849,12 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// current speed
|
// current speed
|
||||||
p.setFont(InterFont(176, QFont::Bold));
|
if (!bigMapOpen) {
|
||||||
drawText(p, rect().center().x(), 210, speedStr);
|
p.setFont(InterFont(176, QFont::Bold));
|
||||||
p.setFont(InterFont(66));
|
drawText(p, rect().center().x(), 210, speedStr);
|
||||||
drawText(p, rect().center().x(), 290, speedUnit, 200);
|
p.setFont(InterFont(66));
|
||||||
|
drawText(p, rect().center().x(), 290, speedUnit, 200);
|
||||||
|
}
|
||||||
|
|
||||||
p.restore();
|
p.restore();
|
||||||
|
|
||||||
@ -1406,6 +1415,7 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets() {
|
|||||||
obstacleDistanceStock = scene.obstacle_distance_stock;
|
obstacleDistanceStock = scene.obstacle_distance_stock;
|
||||||
|
|
||||||
mapOpen = scene.map_open;
|
mapOpen = scene.map_open;
|
||||||
|
bigMapOpen = mapOpen && scene.big_map;
|
||||||
|
|
||||||
onroadDistanceButton = scene.onroad_distance_button;
|
onroadDistanceButton = scene.onroad_distance_button;
|
||||||
|
|
||||||
@ -1461,11 +1471,11 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &p) {
|
void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &p) {
|
||||||
if (showAlwaysOnLateralStatusBar || showConditionalExperimentalStatusBar || roadNameUI) {
|
if ((showAlwaysOnLateralStatusBar || showConditionalExperimentalStatusBar || roadNameUI) && !bigMapOpen) {
|
||||||
drawStatusBar(p);
|
drawStatusBar(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customSignals != 0 && (turnSignalLeft || turnSignalRight)) {
|
if (customSignals != 0 && (turnSignalLeft || turnSignalRight) && !bigMapOpen) {
|
||||||
if (!animationTimer->isActive()) {
|
if (!animationTimer->isActive()) {
|
||||||
animationTimer->start(totalFrames * 11); // 440 milliseconds per loop; syncs up perfectly with my 2019 Lexus ES 350 turn signal clicks
|
animationTimer->start(totalFrames * 11); // 440 milliseconds per loop; syncs up perfectly with my 2019 Lexus ES 350 turn signal clicks
|
||||||
}
|
}
|
||||||
@ -1474,7 +1484,7 @@ void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &p) {
|
|||||||
animationTimer->stop();
|
animationTimer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leadInfo) {
|
if (leadInfo && !bigMapOpen) {
|
||||||
drawLeadInfo(p);
|
drawLeadInfo(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@ private:
|
|||||||
QHBoxLayout *bottom_layout;
|
QHBoxLayout *bottom_layout;
|
||||||
|
|
||||||
bool alwaysOnLateralActive;
|
bool alwaysOnLateralActive;
|
||||||
|
bool bigMapOpen;
|
||||||
bool blindSpotLeft;
|
bool blindSpotLeft;
|
||||||
bool blindSpotRight;
|
bool blindSpotRight;
|
||||||
bool compass;
|
bool compass;
|
||||||
|
@ -397,6 +397,9 @@ void ui_update_frogpilot_params(UIState *s) {
|
|||||||
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
||||||
scene.reverse_cruise_ui = params.getBool("ReverseCruiseUI");
|
scene.reverse_cruise_ui = params.getBool("ReverseCruiseUI");
|
||||||
|
|
||||||
|
bool quality_of_life_visuals = params.getBool("QOLVisuals");
|
||||||
|
scene.big_map = quality_of_life_visuals && params.getBool("BigMap");
|
||||||
|
|
||||||
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
||||||
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
||||||
scene.show_slc_offset_ui = scene.speed_limit_controller && params.getBool("ShowSLCOffsetUI");
|
scene.show_slc_offset_ui = scene.speed_limit_controller && params.getBool("ShowSLCOffsetUI");
|
||||||
|
@ -190,6 +190,7 @@ typedef struct UIScene {
|
|||||||
bool adjacent_path;
|
bool adjacent_path;
|
||||||
bool adjacent_path_metrics;
|
bool adjacent_path_metrics;
|
||||||
bool always_on_lateral_active;
|
bool always_on_lateral_active;
|
||||||
|
bool big_map;
|
||||||
bool blind_spot_left;
|
bool blind_spot_left;
|
||||||
bool blind_spot_path;
|
bool blind_spot_path;
|
||||||
bool blind_spot_right;
|
bool blind_spot_right;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user