        # Integrator
        if CS.steeringPressed:
          self.i_lqr -= self.i_unwind_rate * float(np.sign(self.i_lqr))
        else:
          error = self.angle_steers_des - angle_steers_k
          i = self.i_lqr + self.ki * self.i_rate * error
          control = lqr_output + i
  
          if (error >= 0 and (control <= steers_max or i < 0.0)) or \
             (error <= 0 and (control >= -steers_max or i > 0.0)):
 
</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       u_lqr = float(self.angle_steers_des / self.dc_gain - self.K.dot(self.x_hat))
 </s> add       u_lqr = float(desired_angle / self.dc_gain - self.K.dot(self.x_hat)) </s> remove       # 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
 </s> add  </s> remove     saturated = self._check_saturation(self.output_steer, check_saturation, steers_max)
 </s> add     saturated = self._check_saturation(output_steer, check_saturation, steers_max) </s> remove     lqr_log.steeringAngleDeg = angle_steers_k + lat_plan.angleOffsetDeg
 </s> add     lqr_log.steeringAngleDeg = angle_steers_k + params.angleOffsetAverageDeg
        error = desired_angle - angle_steers_k
        # Integrator
        if CS.steeringPressed:
          self.i_lqr -= self.i_unwind_rate * float(np.sign(self.i_lqr))
        else:
        error = desired_angle - angle_steers_k
          i = self.i_lqr + self.ki * self.i_rate * error
          control = lqr_output + i
  
          if (error >= 0 and (control <= steers_max or i < 0.0)) or \
             (error <= 0 and (control >= -steers_max or i > 0.0)):
keep keep keep keep 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/lib/latcontrol_lqr.py