From 3aa62de3565b100a381a77fa674a6ebe01ea7954 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Thu, 3 Jun 2021 15:34:25 -0700 Subject: [PATCH] hyundai: disable steering on all steer warnings (#20657) * hyundai: set CF_Lkas_ToiFlt for wind down * hyundai: disable steering on all steer warnings * Revert "hyundai: set CF_Lkas_ToiFlt for wind down" This reverts commit 065f0a996db9e52511013c7011ed95876966d134. * update refs Co-authored-by: Adeeb Shihadeh old-commit-hash: 6e300aaf571acf0a61e946d793cd216bceca79b0 --- selfdrive/car/hyundai/carcontroller.py | 4 ++-- selfdrive/car/hyundai/interface.py | 8 -------- selfdrive/test/process_replay/ref_commit | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index ea8f3be373..5f7019fdf5 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -49,8 +49,8 @@ class CarController(): apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, self.p) self.steer_rate_limited = new_steer != apply_steer - # disable if steer angle reach 90 deg, otherwise mdps fault in some models - lkas_active = enabled and abs(CS.out.steeringAngleDeg) < CS.CP.maxSteeringAngleDeg + # disable when temp fault is active + lkas_active = enabled and not CS.out.steerWarning # fix for Genesis hard fault at low speed if CS.out.vEgo < 16.7 and self.car_fingerprint == CAR.HYUNDAI_GENESIS: diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 82ea1c18a2..c4ff372dff 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -27,14 +27,8 @@ class CarInterface(CarInterfaceBase): ret.steerLimitTimer = 0.4 tire_stiffness_factor = 1. - ret.maxSteeringAngleDeg = 90. ret.startAccel = 1.0 - eps_modified = False - for fw in car_fw: - if fw.ecu == "eps" and b"," in fw.fwVersion: - eps_modified = True - if candidate == CAR.SANTA_FE: ret.lateralTuning.pid.kf = 0.00005 ret.mass = 3982. * CV.LB_TO_KG + STD_CARGO_KG @@ -66,8 +60,6 @@ class CarInterface(CarInterfaceBase): ret.steerRatio = 13.75 * 1.15 ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]] - if eps_modified: - ret.maxSteeringAngleDeg = 1000. elif candidate in [CAR.ELANTRA, CAR.ELANTRA_GT_I30]: ret.lateralTuning.pid.kf = 0.00006 ret.mass = 1275. + STD_CARGO_KG diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 373d09c7be..c976e740bf 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -7ed0df84ad09e52f53311f038d7765623ba710b2 \ No newline at end of file +32ee8c7581957064cc24b6c11e1ccf80295a71ae \ No newline at end of file