  
  class LongControl:
    def __init__(self, CP):
      self.long_control_state = LongCtrlState.off  # initialized to off
      self.pid = PIDController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV),
                               (CP.longitudinalTuning.kiBP, CP.longitudinalTuning.kiV),
                               k_f=CP.longitudinalTuning.kf, rate=1 / DT_CTRL)
 
</s> remove                              k_f = CP.longitudinalTuning.kf, rate=1 / DT_CTRL)
 </s> add                              k_f=CP.longitudinalTuning.kf, rate=1 / 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, </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       prevent_overshoot = not CP.stoppingControl and CS.vEgo < 1.5 and v_target_future < 0.7 and v_target_future < self.v_pid
      deadzone = interp(CS.vEgo, CP.longitudinalTuning.deadzoneBP, CP.longitudinalTuning.deadzoneV)
 </s> add       prevent_overshoot = not self.CP.stoppingControl and CS.vEgo < 1.5 and v_target_future < 0.7 and v_target_future < self.v_pid
      deadzone = interp(CS.vEgo, self.CP.longitudinalTuning.deadzoneBP, self.CP.longitudinalTuning.deadzoneV)
    self.CP = CP
  
  class LongControl:
    def __init__(self, CP):
    self.CP = CP
      self.long_control_state = LongCtrlState.off  # initialized to off
      self.pid = PIDController((CP.longitudinalTuning.kpBP, CP.longitudinalTuning.kpV),
                               (CP.longitudinalTuning.kiBP, CP.longitudinalTuning.kiV),
                               k_f=CP.longitudinalTuning.kf, rate=1 / DT_CTRL)
keep keep add keep keep keep keep
 Clean up controllers (#24340)

* clean up lat controllers

* pass CP once

* sort 
selfdrive/controls/lib/longcontrol.py