From 39532ba0eed76bd9cb7356d4a5904c21f444969f Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:11:15 -0600 Subject: [PATCH] blazer --- selfdrive/car/gm/carcontroller.py | 2 +- selfdrive/car/gm/carstate.py | 6 +++--- selfdrive/car/gm/gmcan.py | 2 +- selfdrive/car/gm/interface.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index be21f81829..2a7d72569e 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -560,7 +560,7 @@ class CarController(CarControllerBase): CanBus.POWERTRAIN, self.malibu_cancel_phase, CS.steering_button_prefix)) self.malibu_cancel_phase = (self.malibu_cancel_phase + 1) % 4 self.malibu_cancel_frame += 1 - elif self.CP.carFingerprint in SDGM_CAR and self.CP.carFingerprint not in volt_like: + elif self.CP.carFingerprint in SDGM_CAR and self.CP.carFingerprint not in (volt_like | {CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM}): can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, CS.buttons_counter, CruiseButtons.CANCEL)) else: cancel_bus = CanBus.POWERTRAIN if (self.CP.enableGasInterceptor and self.CP.carFingerprint == CAR.CHEVROLET_BOLT_CC_2022_2023) else CanBus.CAMERA diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index cf335f82fe..69b743011f 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -39,7 +39,7 @@ class CarState(CarStateBase): ret = car.CarState.new_message() fp_ret = custom.FrogPilotCarState.new_message() volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC} - kaofui_state_cars = volt_like | { + kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | { CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM, CAR.CHEVROLET_MALIBU_CC, @@ -223,7 +223,7 @@ class CarState(CarStateBase): messages = [] if CP.networkLocation == NetworkLocation.fwdCamera and not CP.flags & GMFlags.NO_CAMERA.value: volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC} - kaofui_state_cars = volt_like | { + kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | { CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM, CAR.CHEVROLET_MALIBU_CC, @@ -268,7 +268,7 @@ class CarState(CarStateBase): ] volt_like = {CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC} - kaofui_state_cars = volt_like | { + kaofui_state_cars = volt_like | SDGM_CAR | ASCM_INT | { CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM, CAR.CHEVROLET_MALIBU_CC, diff --git a/selfdrive/car/gm/gmcan.py b/selfdrive/car/gm/gmcan.py index 33e7628af2..238a04d5cf 100644 --- a/selfdrive/car/gm/gmcan.py +++ b/selfdrive/car/gm/gmcan.py @@ -79,7 +79,7 @@ def create_buttons_malibu_cancel(bus, phase, prefix=0x41): data[3] = prefix & 0xFF data[4] = 0x00 cancel_bytes = (0x60, 0xAF, 0x65, 0x9E, 0x6A, 0x8D, 0x6F, 0x7C) - idx = (phase % 4) * 2 + idx = ((phase + 2) % 4) * 2 data[5] = cancel_bytes[idx] data[6] = cancel_bytes[idx + 1] return make_can_msg(0x1e1, bytes(data), bus) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 073096aad4..9f4fd4ac0f 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -561,7 +561,7 @@ class CarInterface(CarInterfaceBase): below_min_enable_speed = ret.vEgo < self.CP.minEnableSpeed or self.CS.moving_backward if below_min_enable_speed and not (ret.standstill and ret.brake >= 20 and (self.CP.networkLocation == NetworkLocation.fwdCamera and - (self.CP.carFingerprint in VOLT_LIKE_CARS or self.CP.carFingerprint not in SDGM_CAR))): + (self.CP.carFingerprint in VOLT_LIKE_CARS or self.CP.carFingerprint in {CAR.CHEVROLET_BLAZER, CAR.CHEVROLET_MALIBU_SDGM} or self.CP.carFingerprint not in SDGM_CAR))): events.add(EventName.belowEngageSpeed) if ret.cruiseState.standstill and not self.CP.autoResumeSng: events.add(EventName.resumeRequired)