From 7157ccc6071bf709469ce7a3ceaf6d05a0d6669a Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sun, 11 May 2025 00:35:23 -0500 Subject: [PATCH 1/4] Update interface.py --- selfdrive/car/gm/interface.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index c273d963b..d8193d20a 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -147,7 +147,12 @@ class CarInterface(CarInterfaceBase): ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_SDGM else: # ASCM, OBD-II harness - ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long + try: + disable_long = frogpilot_toggles.disable_openpilot_long + except AttributeError: + disable_long = params.get_bool("DisableOpenpilotLongitudinal") + + ret.openpilotLongitudinalControl = not disable_long ret.networkLocation = NetworkLocation.gateway ret.radarUnavailable = RADAR_HEADER_MSG not in fingerprint[CanBus.OBSTACLE] and not docs ret.pcmCruise = False # stock non-adaptive cruise control is kept off @@ -269,7 +274,11 @@ class CarInterface(CarInterfaceBase): ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM ret.minEnableSpeed = -1 ret.pcmCruise = False - ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long + try: + disable_long = frogpilot_toggles.disable_openpilot_long + except AttributeError: + disable_long = params.get_bool("DisableOpenpilotLongitudinal") + ret.openpilotLongitudinalControl = not disable_long ret.stoppingControl = True ret.autoResumeSng = True @@ -293,7 +302,11 @@ class CarInterface(CarInterfaceBase): ret.radarUnavailable = True ret.experimentalLongitudinalAvailable = False ret.minEnableSpeed = 24 * CV.MPH_TO_MS - ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long + try: + disable_long = frogpilot_toggles.disable_openpilot_long + except AttributeError: + disable_long = params.get_bool("DisableOpenpilotLongitudinal") + ret.openpilotLongitudinalControl = not disable_long ret.pcmCruise = False if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning From 6d16039cd8c7c931296ad6bd52a7e1fe1ac5ef65 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sun, 11 May 2025 01:42:00 -0500 Subject: [PATCH 2/4] Update interface.py --- selfdrive/car/gm/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index d8193d20a..91d71584d 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -152,7 +152,7 @@ class CarInterface(CarInterfaceBase): except AttributeError: disable_long = params.get_bool("DisableOpenpilotLongitudinal") - ret.openpilotLongitudinalControl = not disable_long + ret.openpilotLongitudinalControl = True ret.networkLocation = NetworkLocation.gateway ret.radarUnavailable = RADAR_HEADER_MSG not in fingerprint[CanBus.OBSTACLE] and not docs ret.pcmCruise = False # stock non-adaptive cruise control is kept off @@ -278,7 +278,7 @@ class CarInterface(CarInterfaceBase): disable_long = frogpilot_toggles.disable_openpilot_long except AttributeError: disable_long = params.get_bool("DisableOpenpilotLongitudinal") - ret.openpilotLongitudinalControl = not disable_long + ret.openpilotLongitudinalControl = True ret.stoppingControl = True ret.autoResumeSng = True @@ -306,7 +306,7 @@ class CarInterface(CarInterfaceBase): disable_long = frogpilot_toggles.disable_openpilot_long except AttributeError: disable_long = params.get_bool("DisableOpenpilotLongitudinal") - ret.openpilotLongitudinalControl = not disable_long + ret.openpilotLongitudinalControl = True ret.pcmCruise = False if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning From 0256906d2125b45b1d5d64b372332c92a7ecb475 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 12 May 2025 00:21:17 -0500 Subject: [PATCH 3/4] Update interface.py --- selfdrive/car/gm/interface.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 91d71584d..9b6003ef3 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -136,6 +136,10 @@ class CarInterface(CarInterfaceBase): ret.openpilotLongitudinalControl = True ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG + # CAM_LONG flag only if camera-capable and conditional_experimental_mode enabled + if candidate in CAMERA_ACC_CAR and getattr(frogpilot_toggles, "conditional_experimental_mode", False): + ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG + elif candidate in SDGM_CAR: ret.longitudinalTuning.kiV = [0., 0., 0.] # TODO: tuning ret.experimentalLongitudinalAvailable = False From 439f5af91d57b7b6c0cb856467bfa249af0a5edb Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 12 May 2025 02:01:19 -0500 Subject: [PATCH 4/4] Update interface.py --- selfdrive/car/gm/interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 9b6003ef3..bd942a26b 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -302,7 +302,6 @@ class CarInterface(CarInterfaceBase): elif candidate in CC_ONLY_CAR: ret.flags |= GMFlags.CC_LONG.value - ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_CC_LONG ret.radarUnavailable = True ret.experimentalLongitudinalAvailable = False ret.minEnableSpeed = 24 * CV.MPH_TO_MS @@ -313,6 +312,9 @@ class CarInterface(CarInterfaceBase): ret.openpilotLongitudinalControl = True ret.pcmCruise = False + if not ret.enableGasInterceptor: + ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_CC_LONG + if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning ret.longitudinalTuning.kpBP = [10.7, 10.8, 28.] # 10.7 m/s == 24 mph ret.longitudinalTuning.kpV = [0., 20., 20.] # set lower end to 0 since we can't drive below that speed