From 6aeccfbb399a120ec13e4dd140831f89caa7988d Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Thu, 12 Dec 2024 10:59:50 +0100 Subject: [PATCH] Simplify lateral disengagement logic for MADS configuration Reversed the conditional to align the logic with the `disengage_lateral_on_brake` parameter. This ensures that lateral disengagement behavior is more intuitive and matches the expected configuration. Improves code readability and reduces potential misconfigurations. --- panda | 2 +- sunnypilot/mads/helpers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/panda b/panda index 47a7a18f6c..a879b79b70 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit 47a7a18f6c195fa4456753ca0ab43d8b7880778e +Subproject commit a879b79b707dde8583952f02d80ae1e286146c5d diff --git a/sunnypilot/mads/helpers.py b/sunnypilot/mads/helpers.py index 598391bc97..82678e425e 100644 --- a/sunnypilot/mads/helpers.py +++ b/sunnypilot/mads/helpers.py @@ -49,8 +49,8 @@ class MadsParams: if enabled: CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.ENABLE_MADS - if not disengage_lateral_on_brake: - CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_LATERAL_ON_BRAKE + if disengage_lateral_on_brake: + CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISENGAGE_LATERAL_ON_BRAKE if main_cruise: CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.MAIN_CRUISE_ALLOWED