  
      # Send a "steering required alert" if saturation count has reached the limit
      if (lac_log.saturated and not CS.steeringPressed) or \
         (self.saturated_count > STEER_ANGLE_SATURATION_TIMEOUT):
        # Check if we deviated from the path
        left_deviation = actuators.steer > 0 and lat_plan.dPathPoints[0] < -0.1
        right_deviation = actuators.steer < 0 and lat_plan.dPathPoints[0] > 0.1
  
        if left_deviation or right_deviation:
          self.events.add(EventName.steerSaturated)
  
      return actuators, v_acc_sol, a_acc_sol, lac_log
 
</s> remove       self.output_steer = lqr_output + self.i_lqr
      self.output_steer = clip(self.output_steer, -steers_max, steers_max)
 </s> add       output_steer = lqr_output + self.i_lqr
      output_steer = clip(output_steer, -steers_max, steers_max) </s> remove         error = self.angle_steers_des - angle_steers_k
 </s> add         error = desired_angle - angle_steers_k </s> remove     actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(self.active, CS, self.CP, lat_plan)
 </s> add     actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(self.active, CS, self.CP, self.VM, params, lat_plan) </s> remove     lqr_log.steeringAngleDeg = angle_steers_k + lat_plan.angleOffsetDeg
 </s> add     lqr_log.steeringAngleDeg = angle_steers_k + params.angleOffsetAverageDeg </s> remove     curvature_diff_from_psi = psi/(max(v_ego, 1e-1) * delay) - current_curvature
    next_curvature = current_curvature + 2*curvature_diff_from_psi
 </s> add     curvature_diff_from_psi = psi / (max(v_ego, 1e-1) * delay) - current_curvature
    next_curvature = current_curvature + 2 * curvature_diff_from_psi
  
      # Send a "steering required alert" if saturation count has reached the limit
      if (lac_log.saturated and not CS.steeringPressed) or \
         (self.saturated_count > STEER_ANGLE_SATURATION_TIMEOUT):



  
        if left_deviation or right_deviation:
          self.events.add(EventName.steerSaturated)
  
      return actuators, v_acc_sol, a_acc_sol, lac_log
keep keep keep keep replace replace replace keep keep keep keep keep
 LateralPlanner should only compute curvature (#20289)

* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/controls/controlsd.py