mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 15:03:43 +08:00
Dynamic Lane Profile: Only allow for gen1 driving models
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user