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