From 355929ba095162db8ee129462cf5aab20b73e185 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 16 Nov 2026 20:33:38 -0600 Subject: [PATCH] Skip unrelated GM longitudinal and pedal profile checks --- opendbc_repo/opendbc/car/gm/values.py | 14 ++++++++++---- prebuilt.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/opendbc_repo/opendbc/car/gm/values.py b/opendbc_repo/opendbc/car/gm/values.py index 2818790c38..be5c2e075a 100644 --- a/opendbc_repo/opendbc/car/gm/values.py +++ b/opendbc_repo/opendbc/car/gm/values.py @@ -326,7 +326,8 @@ def is_lacrosse_gateway_profile(cp: CarParams) -> bool: def is_gm_auto_hold(cp: CarParams) -> bool: - return ((is_volt_gateway_longitudinal(cp) or is_volt_ascm_longitudinal(cp) or is_volt_camera_longitudinal(cp) or + return (getattr(cp, 'openpilotLongitudinalControl', False) and + (is_volt_gateway_longitudinal(cp) or is_volt_ascm_longitudinal(cp) or is_volt_camera_longitudinal(cp) or is_volt_sdgm_profile(cp, longitudinal=True) or is_volt_camera_removed(cp, longitudinal=True) or is_lacrosse_gateway_profile(cp) and cp.openpilotLongitudinalControl) and gm_control_word(cp) in (0x4084, 0xC084, 0x4287, 0x4687, 0x4A87, 0x4E87, 0x4087, 0x5087, 0x5487, @@ -358,6 +359,8 @@ VOLT_ASCM_ALLOWED_FLAGS = VOLT_ASCM_REQUIRED_FLAGS | VOLT_ASCM_OPTIONAL_FLAGS def is_volt_ascm_longitudinal(cp: CarParams) -> bool: """Admit the exact ASCM Volt longitudinal and physical interceptor configurations.""" try: + if cp.brand != 'gm' or cp.carFingerprint != CAR.CHEVROLET_VOLT_ASCM: + return False profile = camera_acc_pedal_profile(cp) if profile is not None and profile.topology == "ascm": return profile.longitudinal @@ -472,8 +475,9 @@ def volt_sdgm_accepted_accel_max(cp: CarParams, speed: float) -> float: def is_volt_longitudinal(cp: CarParams) -> bool: - return (is_volt_gateway_longitudinal(cp) or is_volt_ascm_longitudinal(cp) or is_volt_camera_longitudinal(cp) or - is_volt_sdgm_profile(cp, longitudinal=True) or is_volt_camera_removed(cp, longitudinal=True)) + return (getattr(cp, 'openpilotLongitudinalControl', False) and + (is_volt_gateway_longitudinal(cp) or is_volt_ascm_longitudinal(cp) or is_volt_camera_longitudinal(cp) or + is_volt_sdgm_profile(cp, longitudinal=True) or is_volt_camera_removed(cp, longitudinal=True))) def is_volt_gateway_alternate_brake(cp: CarParams) -> bool: @@ -1174,7 +1178,7 @@ def volt_camera_pedal_word(profile, auto_hold: bool, one_pedal: bool) -> int: def camera_acc_pedal_profile(cp): try: - if cp.brand != 'gm' or cp.carFingerprint not in CAMERA_ACC_PEDAL_CAR: + if cp.brand != 'gm' or not int(cp.flags) & _GM_PEDAL_LONG_FLAG or cp.carFingerprint not in CAMERA_ACC_PEDAL_CAR: return None if len(cp.safetyConfigs) != 1: return None @@ -1325,6 +1329,8 @@ MALIBU_HYBRID_SOURCES = {0x184: 8, 0x34A: 5, 0x348: 5, 0x1E1: 7, 0x1C4: 8, def malibu_hybrid_profile(cp): try: + if cp.brand != 'gm' or cp.carFingerprint != CAR.CHEVROLET_MALIBU_HYBRID_CC: + return None if len(cp.safetyConfigs) != 1: return None profile = MALIBU_HYBRID_PROFILES.get(int(cp.safetyConfigs[0].safetyParam)) diff --git a/prebuilt.json b/prebuilt.json index 6bc7b4314d..da1dfd80b6 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "60bef42e07e5f5ed97bb4220d25cd99d044e618e8b2dab1bcc32f96d4068a289", "schema_version": 1} +{"protected_inventory_sha256": "8b128e2ae4a94a83a4a2f209d9e09f1740969f56053652b04334be957c1adfeb", "schema_version": 1}