diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index f28a0f7b59..510d6baa84 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -45,10 +45,11 @@ class CarController: # Steering (50Hz) # Avoid GM EPS faults when transmitting messages too close together: skip this transmit if we just received the # next Panda loopback confirmation in the current CS frame. + steer_step = self.params.ACTIVE_STEER_STEP if CC.latActive else self.params.INACTIVE_STEER_STEP if CS.loopback_lka_steering_cmd_updated: self.lka_steering_cmd_counter += 1 self.sent_lka_steering_cmd = True - elif (self.frame % self.params.STEER_STEP) == 0: + elif (self.frame % steer_step) == 0: # Initialize ASCMLKASteeringCmd counter using the camera if not self.sent_lka_steering_cmd and self.CP.networkLocation == NetworkLocation.fwdCamera: self.lka_steering_cmd_counter = CS.camera_lka_steering_cmd_counter + 1 diff --git a/selfdrive/car/gm/values.py b/selfdrive/car/gm/values.py index f8f9e7f043..3adab9d829 100644 --- a/selfdrive/car/gm/values.py +++ b/selfdrive/car/gm/values.py @@ -11,7 +11,8 @@ Ecu = car.CarParams.Ecu class CarControllerParams: STEER_MAX = 300 # GM limit is 3Nm. Used by carcontroller to generate LKA output - STEER_STEP = 2 # Control frames per command (50hz) + ACTIVE_STEER_STEP = 2 # Control frames per command (50hz) + INACTIVE_STEER_STEP = 10 # Control frames per command (10hz) STEER_DELTA_UP = 7 # Delta rates require review due to observed EPS weakness STEER_DELTA_DOWN = 17 STEER_DRIVER_ALLOWANCE = 50