        desired_curvature, desired_curvature_rate = get_lag_adjusted_curvature(self.CP, CS.vEgo,
                                                                               lat_plan.psis,
                                                                               lat_plan.curvatures,
                                                                               lat_plan.curvatureRates)
        actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(CC.latActive, CS, self.CP, self.VM,
                                                                               params, self.last_actuators, desired_curvature,
                                                                               desired_curvature_rate, self.sm['liveLocationKalman'])
      else:
        lac_log = log.ControlsState.LateralDebugState.new_message()
        if self.sm.rcv_frame['testJoystick'] > 0:
          if CC.longActive:
 
</s> remove       actuators.accel = self.LoC.update(CC.longActive, CS, self.CP, long_plan, pid_accel_limits, t_since_plan)
 </s> add       actuators.accel = self.LoC.update(CC.longActive, CS, long_plan, pid_accel_limits, t_since_plan) </s> remove   def update(self, active, CS, CP, VM, params, last_actuators, desired_curvature, desired_curvature_rate, llk):
 </s> add   def update(self, active, CS, VM, params, last_actuators, desired_curvature, desired_curvature_rate, llk): </s> remove       v_target_upper = interp(CP.longitudinalActuatorDelayUpperBound + t_since_plan, T_IDXS[:CONTROL_N], speeds)
      a_target_upper = 2 * (v_target_upper - v_target) / CP.longitudinalActuatorDelayUpperBound - a_target
 </s> add       v_target_upper = interp(self.CP.longitudinalActuatorDelayUpperBound + t_since_plan, T_IDXS[:CONTROL_N], speeds)
      a_target_upper = 2 * (v_target_upper - v_target) / self.CP.longitudinalActuatorDelayUpperBound - a_target </s> remove       if not CS.standstill or output_accel > CP.stopAccel:
        output_accel -= CP.stoppingDecelRate * DT_CTRL
 </s> add       if not CS.standstill or output_accel > self.CP.stopAccel:
        output_accel -= self.CP.stoppingDecelRate * DT_CTRL </s> remove     self.long_control_state = long_control_state_trans(CP, active, self.long_control_state, CS.vEgo,
 </s> add     self.long_control_state = long_control_state_trans(self.CP, active, self.long_control_state, CS.vEgo,
      actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(CC.latActive, CS, self.VM, params,
                                                                             self.last_actuators, desired_curvature,
        desired_curvature, desired_curvature_rate = get_lag_adjusted_curvature(self.CP, CS.vEgo,
                                                                               lat_plan.psis,
                                                                               lat_plan.curvatures,
                                                                               lat_plan.curvatureRates)
      actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(CC.latActive, CS, self.VM, params,
                                                                             self.last_actuators, desired_curvature,
      actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(CC.latActive, CS, self.VM, params,
                                                                             self.last_actuators, desired_curvature,
                                                                               desired_curvature_rate, self.sm['liveLocationKalman'])
      else:
        lac_log = log.ControlsState.LateralDebugState.new_message()
        if self.sm.rcv_frame['testJoystick'] > 0:
          if CC.longActive:
keep keep keep keep replace replace keep keep keep keep keep
 Clean up controllers (#24340)

* clean up lat controllers

* pass CP once

* sort 
selfdrive/controls/controlsd.py