From 5a5de703035c97070984dcca6adcead9bda11db5 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:54:46 -0500 Subject: [PATCH] Update carcontroller.py --- opendbc_repo/opendbc/car/gm/carcontroller.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opendbc_repo/opendbc/car/gm/carcontroller.py b/opendbc_repo/opendbc/car/gm/carcontroller.py index 9912168a2..860de4df0 100644 --- a/opendbc_repo/opendbc/car/gm/carcontroller.py +++ b/opendbc_repo/opendbc/car/gm/carcontroller.py @@ -7,7 +7,6 @@ from opendbc.car.gm import gmcan from opendbc.car.common.conversions import Conversions as CV from opendbc.car.gm.values import ASCM_INT, CAR, CC_ONLY_CAR, CC_REGEN_PADDLE_CAR, DBC, EV_CAR, SDGM_CAR, AccState, CanBus, CarControllerParams, CruiseButtons, GMFlags from opendbc.car.interfaces import CarControllerBase -from opendbc.car.gm.cancel_logic import get_stock_cc_active_for_cancel from openpilot.common.params import Params, UnknownKeyName from openpilot.starpilot.common.testing_grounds import testing_ground @@ -21,6 +20,13 @@ CAMERA_CANCEL_DELAY_FRAMES = 10 MIN_STEER_MSG_INTERVAL_MS = 15 +def get_stock_cc_active_for_cancel(CP, CS): + stock_cc_active = CS.out.cruiseState.enabled or CS.pcm_acc_status != AccState.OFF + if CP.carFingerprint == CAR.CHEVROLET_BOLT_ACC_2022_2023_PEDAL: + return CS.out.cruiseState.enabled + return stock_cc_active + + class CarController(CarControllerBase): def __init__(self, dbc_names, CP): super().__init__(dbc_names, CP)