From 48b33a3f9d908baf4fe909117363b5f4ebaccc8f Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Wed, 7 May 2025 08:20:52 -0500 Subject: [PATCH] Update carcontroller.py --- selfdrive/car/gm/carcontroller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index 527e12c586..31b1207530 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -118,6 +118,7 @@ class CarController(CarControllerBase): self.CP.carFingerprint in CC_REGEN_PADDLE_CAR and self.CP.openpilotLongitudinalControl and CC.longActive and + self.CP.enableGasInterceptor and self.regen_paddle_pressed ) @@ -255,7 +256,8 @@ class CarController(CarControllerBase): # Send dashboard UI commands (ACC status) send_fcw = hud_alert == VisualAlert.fcw - can_sends.append(gmcan.create_acc_dashboard_command(self.packer_pt, CanBus.POWERTRAIN, CC.enabled, + if self.frame % 10 == 0: + can_sends.append(gmcan.create_acc_dashboard_command(self.packer_pt, CanBus.POWERTRAIN, CC.enabled, hud_v_cruise * CV.MS_TO_KPH, hud_control, send_fcw)) else: # to keep accel steady for logs when not sending gas @@ -265,13 +267,13 @@ class CarController(CarControllerBase): # and that ADAS is alive (10hz) if not self.CP.radarUnavailable: tt = self.frame * DT_CTRL - time_and_headlights_step = 10 + time_and_headlights_step = 20 if self.frame % time_and_headlights_step == 0: idx = (self.frame // time_and_headlights_step) % 4 can_sends.append(gmcan.create_adas_time_status(CanBus.OBSTACLE, int((tt - self.start_time) * 60), idx)) can_sends.append(gmcan.create_adas_headlights_status(self.packer_obj, CanBus.OBSTACLE)) - speed_and_accelerometer_step = 2 + speed_and_accelerometer_step = 4 if self.frame % speed_and_accelerometer_step == 0: idx = (self.frame // speed_and_accelerometer_step) % 4 can_sends.append(gmcan.create_adas_steering_status(CanBus.OBSTACLE, idx)) @@ -305,7 +307,7 @@ class CarController(CarControllerBase): if self.CP.networkLocation == NetworkLocation.fwdCamera: # Silence "Take Steering" alert sent by camera, forward PSCMStatus with HandsOffSWlDetectionStatus=1 - if self.frame % 10 == 0: + if self.frame % 20 == 0: can_sends.append(gmcan.create_pscm_status(self.packer_pt, CanBus.CAMERA, CS.pscm_status)) new_actuators = actuators.as_builder()