From f4da6a3e3bd40336d8d3fc6c4f19ddc27c8aae87 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 16 Feb 2026 13:07:55 -0600 Subject: [PATCH] silverado --- selfdrive/car/gm/carcontroller.py | 3 ++- selfdrive/car/gm/gmcan.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index ab4c0cad1..6833a616d 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -483,7 +483,8 @@ class CarController(CarControllerBase): acc_engaged = CC.enabled # GasRegenCmdActive needs to be 1 to avoid cruise faults. It describes the ACC state, not actuation - can_sends.append(gmcan.create_gas_regen_command(self.packer_pt, CanBus.POWERTRAIN, self.apply_gas, idx, acc_engaged, at_full_stop)) + can_sends.append(gmcan.create_gas_regen_command(self.packer_pt, CanBus.POWERTRAIN, self.apply_gas, idx, acc_engaged, at_full_stop, + include_always_one3=self.CP.carFingerprint in kaofui_cars)) can_sends.append(gmcan.create_friction_brake_command(self.packer_ch, friction_brake_bus, self.apply_brake, idx, CC.enabled, near_stop, at_full_stop, self.CP)) diff --git a/selfdrive/car/gm/gmcan.py b/selfdrive/car/gm/gmcan.py index 14f913dda..565cf75fb 100644 --- a/selfdrive/car/gm/gmcan.py +++ b/selfdrive/car/gm/gmcan.py @@ -118,7 +118,7 @@ def create_adas_keepalive(bus): return [make_can_msg(0x409, dat, bus), make_can_msg(0x40a, dat, bus)] -def create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop): +def create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop, include_always_one3=False): values = { "GasRegenCmdActive": enabled, "RollingCounter": idx, @@ -127,8 +127,9 @@ def create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop): "GasRegenFullStopActive": at_full_stop, "GasRegenAlwaysOne": 1, "GasRegenAlwaysOne2": 1, - "GasRegenAlwaysOne3": 1, } + if include_always_one3: + values["GasRegenAlwaysOne3"] = 1 dat = packer.make_can_msg("ASCMGasRegenCmd", bus, values)[2] values["GasRegenChecksum"] = (((0xff - dat[1]) & 0xff) << 16) | \