|
|
|
|
@@ -221,7 +221,7 @@ void OnroadAlerts::updateAlert(const Alert &a) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnroadAlerts::paintEvent(QPaintEvent *event) {
|
|
|
|
|
if (alert.size == cereal::ControlsState::AlertSize::NONE) {
|
|
|
|
|
if (alert.size == cereal::ControlsState::AlertSize::NONE || scene.show_driver_camera) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
static std::map<cereal::ControlsState::AlertSize, const int> alert_heights = {
|
|
|
|
|
@@ -337,7 +337,9 @@ void ExperimentalButton::paintEvent(QPaintEvent *event) {
|
|
|
|
|
(scene.always_on_lateral_active ? QColor(10, 186, 181, 255) :
|
|
|
|
|
QColor(0, 0, 0, 166));
|
|
|
|
|
|
|
|
|
|
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0);
|
|
|
|
|
if (!scene.show_driver_camera) {
|
|
|
|
|
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -409,7 +411,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));
|
|
|
|
|
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE || customSignals && (turnSignalLeft || turnSignalRight)) || showDriverCamera;
|
|
|
|
|
status = s.status;
|
|
|
|
|
|
|
|
|
|
// update engageability/experimental mode button
|
|
|
|
|
@@ -904,7 +906,7 @@ void AnnotatedCameraWidget::paintGL() {
|
|
|
|
|
wide_cam_requested = wide_cam_requested && s->scene.calibration_wide_valid;
|
|
|
|
|
}
|
|
|
|
|
paramsMemory.putBoolNonBlocking("WideCamera", wide_cam_requested);
|
|
|
|
|
CameraWidget::setStreamType(cameraView == 3 ? VISION_STREAM_DRIVER :
|
|
|
|
|
CameraWidget::setStreamType(showDriverCamera || cameraView == 3 ? VISION_STREAM_DRIVER :
|
|
|
|
|
wide_cam_requested && cameraView != 1 ? VISION_STREAM_WIDE_ROAD : VISION_STREAM_ROAD);
|
|
|
|
|
|
|
|
|
|
s->scene.wide_cam = CameraWidget::getStreamType() == VISION_STREAM_WIDE_ROAD;
|
|
|
|
|
@@ -922,7 +924,7 @@ void AnnotatedCameraWidget::paintGL() {
|
|
|
|
|
painter.setRenderHint(QPainter::Antialiasing);
|
|
|
|
|
painter.setPen(Qt::NoPen);
|
|
|
|
|
|
|
|
|
|
if (s->scene.world_objects_visible) {
|
|
|
|
|
if (s->scene.world_objects_visible && !showDriverCamera) {
|
|
|
|
|
update_model(s, model, sm["uiPlan"].getUiPlan());
|
|
|
|
|
drawLaneLines(painter, s);
|
|
|
|
|
|
|
|
|
|
@@ -1027,26 +1029,29 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets(QPainter &p) {
|
|
|
|
|
mapOpen = scene.map_open;
|
|
|
|
|
obstacleDistance = scene.obstacle_distance;
|
|
|
|
|
obstacleDistanceStock = scene.obstacle_distance_stock;
|
|
|
|
|
showDriverCamera = scene.show_driver_camera;
|
|
|
|
|
stoppedEquivalence = scene.stopped_equivalence;
|
|
|
|
|
turnSignalLeft = scene.turn_signal_left;
|
|
|
|
|
turnSignalRight = scene.turn_signal_right;
|
|
|
|
|
useSI = scene.use_si;
|
|
|
|
|
|
|
|
|
|
if (leadInfo) {
|
|
|
|
|
drawLeadInfo(p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (alwaysOnLateral || conditionalExperimental) {
|
|
|
|
|
drawStatusBar(p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (customSignals && (turnSignalLeft || turnSignalRight)) {
|
|
|
|
|
if (!animationTimer->isActive()) {
|
|
|
|
|
animationTimer->start(totalFrames * 11); // 440 milliseconds per loop; syncs up perfectly with my 2019 Lexus ES 350 turn signal clicks
|
|
|
|
|
if (!showDriverCamera) {
|
|
|
|
|
if (leadInfo) {
|
|
|
|
|
drawLeadInfo(p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (alwaysOnLateral || conditionalExperimental) {
|
|
|
|
|
drawStatusBar(p);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (customSignals && (turnSignalLeft || turnSignalRight)) {
|
|
|
|
|
if (!animationTimer->isActive()) {
|
|
|
|
|
animationTimer->start(totalFrames * 11); // 440 milliseconds per loop; syncs up perfectly with my 2019 Lexus ES 350 turn signal clicks
|
|
|
|
|
}
|
|
|
|
|
drawTurnSignals(p);
|
|
|
|
|
} else if (animationTimer->isActive()) {
|
|
|
|
|
animationTimer->stop();
|
|
|
|
|
}
|
|
|
|
|
drawTurnSignals(p);
|
|
|
|
|
} else if (animationTimer->isActive()) {
|
|
|
|
|
animationTimer->stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map_settings_btn_bottom->setEnabled(map_settings_btn->isEnabled());
|
|
|
|
|
|