From aa313c5fd071589ac5c73bba726c7fbac82a2ce4 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 18 May 2025 23:14:40 -0400 Subject: [PATCH] this ain't right --- sunnypilot/mads/helpers.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sunnypilot/mads/helpers.py b/sunnypilot/mads/helpers.py index 95f39bf43a..819b5af163 100644 --- a/sunnypilot/mads/helpers.py +++ b/sunnypilot/mads/helpers.py @@ -49,16 +49,9 @@ def set_car_specific_params(CP: structs.CarParams, CP_SP: structs.CarParamsSP, p CP_SP.flags |= HyundaiFlagsSP.LONGITUDINAL_MAIN_CRUISE_TOGGLEABLE.value CP_SP.safetyParam |= HyundaiSafetyFlagsSP.LONG_MAIN_CRUISE_TOGGLEABLE - # MADS is currently not supported in Tesla due to lack of consistent states to engage controls - # TODO-SP: To enable MADS for Tesla, identify consistent signals for MADS toggling - if CP.brand == "tesla": - params.put("MadsSteeringMode", "2") - params.put_bool("MadsUnifiedEngagementMode", True) - params.remove("MadsMainCruiseAllowed") - - # MADS is currently not supported in Rivian due to lack of consistent states to engage controls - # TODO-SP: To enable MADS for Rivian, identify consistent signals for MADS toggling - if CP.brand == "rivian": - params.put("MadsSteeringMode", "2") - params.put_bool("MadsUnifiedEngagementMode", True) - params.remove("MadsMainCruiseAllowed") + # MADS is currently not supported in Rivian/Tesla due to lack of consistent states to engage controls + # TODO-SP: To enable MADS for Rivian/Tesla, identify consistent signals for MADS toggling + if CP.brand in ("rivian", "tesla"): + params.put("MadsSteeringMode", "2") + params.put_bool("MadsUnifiedEngagementMode", True) + params.remove("MadsMainCruiseAllowed")