diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 3aaba59f91..fa6c49ee62 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -649,10 +649,8 @@ class Controls: self.LoC.reset() if not self.joystick_mode: - speeds = long_plan.speeds - resume = False - if len(speeds): - resume = self.enabled_long and CS.standstill and speeds[-1] > 0.1 and self.CP.carName == "hyundai" + a_lead = self.sm['radarState'].leadOne.aLeadK + resume = self.enabled_long and CS.standstill and a_lead > 0.1 and self.CP.carName == "hyundai" # accel PID loop pid_accel_limits = self.CI.get_pid_accel_limits(self.CP, CS.vEgo, self.v_cruise_helper.v_cruise_kph * CV.KPH_TO_MS)