From 264e9d8a77ba9e4bd549f78296fefe33e79b409d Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Thu, 15 Jan 2026 22:50:37 -0600 Subject: [PATCH] Update redneck --- selfdrive/car/gm/carcontroller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index 3ed254271..f7b8d4641 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -373,10 +373,11 @@ class CarController(CarControllerBase): idx = (self.frame // 4) % 4 if self.CP.flags & GMFlags.CC_LONG.value: - if CC.longActive and CS.out.vEgo > self.CP.minEnableSpeed: + if CC.longActive and CS.out.cruiseState.enabled and CS.out.vEgo > self.CP.minEnableSpeed: # Using extend instead of append since the message is only sent intermittently can_sends.extend(gmcan.create_gm_cc_spam_command(self.packer_pt, self, CS, actuators, frogpilot_toggles)) - elif CC.enabled and self.frame % 52 == 0 and CS.cruise_buttons == CruiseButtons.UNPRESS and CS.out.gasPressed and CS.out.cruiseState.speed < CS.out.vEgo < hud_v_cruise: + elif (CS.out.cruiseState.enabled and CC.enabled and self.frame % 52 == 0 and + CS.cruise_buttons == CruiseButtons.UNPRESS and CS.out.gasPressed and CS.out.cruiseState.speed < CS.out.vEgo < hud_v_cruise): can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.DECEL_SET)) if self.CP.enableGasInterceptor: can_sends.append(create_gas_interceptor_command(self.packer_pt, interceptor_gas_cmd, idx))