Dynamic Lane Profile: Only allow for gen1 driving models

This commit is contained in:
Jason Wen
2024-02-09 13:37:52 -05:00
parent 3d4edc7289
commit e133647123
4 changed files with 11 additions and 2 deletions
@@ -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"];
+3 -1
View File
@@ -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) {
+2 -1
View File
@@ -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");
+2
View File
@@ -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 {