          self.a_acc = self.a_cruise
  
      self.v_acc_future = min([self.mpc1.v_mpc_future, self.mpc2.v_mpc_future, v_cruise_setpoint])
  
    def update(self, sm, CP, VM, PP):
      """Gets called when new radarState is available"""
      cur_time = sec_since_boot()
      v_ego = sm['carState'].vEgo
  
      long_control_state = sm['controlsState'].longControlState
 
</s> remove   def update(self, sm, CP, VM):
 </s> add   def update(self, sm, CP): </s> remove     self.angle_steers_des = 0.0
    self.angle_steers_des_mpc = 0.0
    self.angle_steers_des_time = 0.0
 </s> add     self.desired_curvature = 0.0
    self.desired_curvature_rate = 0.0 </s> remove     steering_wheel_angle_offset_deg = sm['liveParameters'].angleOffsetDeg
    steering_wheel_angle_deg = sm['carState'].steeringAngleDeg

    # Update vehicle model
    x = max(sm['liveParameters'].stiffnessFactor, 0.1)
    sr = max(sm['liveParameters'].steerRatio, 0.1)
    VM.update_params(x, sr)
    curvature_factor = VM.curvature_factor(v_ego)
    measured_curvature = -curvature_factor * math.radians(steering_wheel_angle_deg - steering_wheel_angle_offset_deg) / VM.sR

 </s> add     measured_curvature = sm['controlsState'].curvature </s> remove   def update(self, active, CS, CP, lat_plan):
 </s> add   def update(self, active, CS, CP, VM, params, lat_plan): </s> remove     self.angle_steers_des = 0.
 </s> add 
  def update(self, sm, CP):
          self.a_acc = self.a_cruise
  
      self.v_acc_future = min([self.mpc1.v_mpc_future, self.mpc2.v_mpc_future, v_cruise_setpoint])
  
  def update(self, sm, CP):
      """Gets called when new radarState is available"""
      cur_time = sec_since_boot()
      v_ego = sm['carState'].vEgo
  
      long_control_state = sm['controlsState'].longControlState
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/longitudinal_planner.py