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.
This commit is contained in:
DevTekVE
2024-12-12 10:59:50 +01:00
parent f5f0e89f0b
commit 6aeccfbb39
2 changed files with 3 additions and 3 deletions
+1 -1
Submodule panda updated: 47a7a18f6c...a879b79b70
+2 -2
View File
@@ -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