default to true for HKG main cruise toggle

This commit is contained in:
Jason Wen
2025-01-04 19:27:53 -05:00
parent da2864fb36
commit f047963f8a
3 changed files with 3 additions and 4 deletions
-1
View File
@@ -203,7 +203,6 @@ std::unordered_map<std::string, uint32_t> keys = {
// sunnypilot params
{"EnableGithubRunner", PERSISTENT},
{"HyundaiLongitudinalMainCruiseToggleable", PERSISTENT},
{"MadsMainCruiseAllowed", PERSISTENT},
{"MadsPauseLateralOnBrake", PERSISTENT},
{"MadsUnifiedEngagementMode", PERSISTENT},
+3 -2
View File
@@ -51,12 +51,13 @@ class MadsParams:
def set_car_specific_params(self, CP):
if CP.carName == "hyundai":
# TODO-SP: This should be separated from MADS module for future implementations
hyundai_cruise_main_toggleable = self.read_param("HyundaiLongitudinalMainCruiseToggleable")
# Use "HyundaiLongitudinalMainCruiseToggleable" param
hyundai_cruise_main_toggleable = True
if hyundai_cruise_main_toggleable:
CP.sunnypilotFlags |= HyundaiFlagsSP.LONGITUDINAL_MAIN_CRUISE_TOGGLEABLE.value
CP.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_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, dentify consistent signals for MADS toggling
# TODO-SP: To enable MADS for Tesla, identify consistent signals for MADS toggling
if CP.carName == "tesla":
self.params.remove("Mads")
-1
View File
@@ -49,7 +49,6 @@ def manager_init() -> None:
("MadsMainCruiseAllowed", "1"),
("MadsPauseLateralOnBrake", "0"),
("MadsUnifiedEngagementMode", "1"),
("HyundaiLongitudinalMainCruiseToggleable", "1"),
]
if params.get_bool("RecordFrontLock"):