From deb5322c408c9a3cb7152f245fbcdceb248734e6 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Thu, 22 May 2025 00:22:58 -0500 Subject: [PATCH] guard off frames. --- selfdrive/car/gm/carcontroller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index 7b7db292e..040513192 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -161,9 +161,11 @@ class CarController(CarControllerBase): # while frames remain, send off spoof if not colliding with steer if getattr(self, "off_spoof_frames", 0) > 0: if self.frame != self.last_steer_frame: + # send off messages can_sends.append(gmcan.create_prndl2_command(self.packer_pt, CanBus.POWERTRAIN, False)) can_sends.append(gmcan.create_regen_paddle_command(self.packer_pt, CanBus.POWERTRAIN, False)) - self.off_spoof_frames -= 1 + # decrement only when sent + self.off_spoof_frames -= 1 # Update regen_active state self.last_regen_active = regen_active