diff --git a/selfdrive/controls/lib/lateral_planner.py b/selfdrive/controls/lib/lateral_planner.py index 7faea892253852..2ee859587f6266 100644 --- a/selfdrive/controls/lib/lateral_planner.py +++ b/selfdrive/controls/lib/lateral_planner.py @@ -49,7 +49,6 @@ def __init__(self, CP, use_lanelines=True, wide_camera=False): self.dynamic_lane_profile = int(self.param_s.get("DynamicLaneProfile", encoding="utf8")) self.dynamic_lane_profile_status = False self.dynamic_lane_profile_status_buffer = False - self.second = 0.0 self.standstill_elapsed = 0.0 self.standstill = False @@ -59,10 +58,7 @@ def reset_mpc(self, x0=np.zeros(4)): self.lat_mpc.reset(x0=self.x0) def update(self, sm): - self.second += DT_MDL - if self.second > 1.0: - self.dynamic_lane_profile = int(self.param_s.get("DynamicLaneProfile", encoding="utf8")) - self.second = 0.0 + self.dynamic_lane_profile = int(self.param_s.get("DynamicLaneProfile", encoding='utf8')) self.standstill = sm['carState'].standstill # clip speed , lateral planning is not possible at 0 speed self.v_ego = max(MIN_SPEED, sm['carState'].vEgo)