diff --git a/selfdrive/ui/qt/offroad/sunnypilot/sunnypilot_settings.cc b/selfdrive/ui/qt/offroad/sunnypilot/sunnypilot_settings.cc index 7a2b5970b6..ca1cd30db0 100644 --- a/selfdrive/ui/qt/offroad/sunnypilot/sunnypilot_settings.cc +++ b/selfdrive/ui/qt/offroad/sunnypilot/sunnypilot_settings.cc @@ -434,6 +434,10 @@ void SunnypilotPanel::updateToggles() { toggles["VisionCurveLaneless"]->setEnabled(dynamic_lane_profile_param == "2"); toggles["VisionCurveLaneless"]->refresh(); + auto driving_model_gen = QString::fromStdString(params.get("DrivingModelGeneration")); + dlp_settings->setVisible(driving_model_gen == "1"); + toggles["VisionCurveLaneless"]->setVisible(driving_model_gen == "1"); + auto enforce_torque_lateral = toggles["EnforceTorqueLateral"]; auto custom_torque_lateral = toggles["CustomTorqueLateral"]; auto live_torque = toggles["LiveTorque"]; diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index fbdf77cafa..1a424d45a7 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -1579,7 +1579,9 @@ void AnnotatedCameraWidget::drawFeatureStatusText(QPainter &p, int x, int y) { } // Dynamic Lane Profile - drawFeatureStatusElement(dynamicLaneProfile, feature_text.dlp_list_text, feature_color.dlp_list_color, true, "OFF", "DLP"); + if (uiState()->scene.driving_model_gen == 1) { + drawFeatureStatusElement(dynamicLaneProfile, feature_text.dlp_list_text, feature_color.dlp_list_color, true, "OFF", "DLP"); + } // TODO: Add toggle variables to cereal, and parse from cereal if (longitudinal) { diff --git a/selfdrive/ui/qt/onroad_settings.cc b/selfdrive/ui/qt/onroad_settings.cc index 2a1b1a8ec6..e716030c45 100644 --- a/selfdrive/ui/qt/onroad_settings.cc +++ b/selfdrive/ui/qt/onroad_settings.cc @@ -185,6 +185,7 @@ void OnroadSettings::refresh() { scene.dynamic_experimental_control = params.getBool("DynamicExperimentalControl"); scene.speed_limit_control_enabled = params.getBool("EnableSlc"); scene.speed_limit_control_policy = std::atoi(params.get("SpeedLimitControlPolicy").c_str()); + scene.driving_model_gen = std::atoi(params.get("DrivingModelGeneration").c_str()); if (!isVisible()) return; @@ -194,7 +195,7 @@ void OnroadSettings::refresh() { // Dynamic Lane Profile dlp_widget->updateDynamicLaneProfile("DynamicLaneProfile"); - dlp_widget->setVisible(true); + dlp_widget->setVisible(scene.driving_model_gen == 1); // Gap Adjust Cruise gac_widget->updateGapAdjustCruise("LongitudinalPersonality"); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index a8e73b1148..9595357fab 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -255,6 +255,8 @@ typedef struct UIScene { bool speed_limit_warning_flash; int speed_limit_warning_type; int speed_limit_warning_value_offset; + + int driving_model_gen; } UIScene; class UIState : public QObject {