mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-07 14:42:08 +08:00
hyundai: increase steering angle limit for custom eps fw (#19744)
* hyundai: increase steering angle limit for custom eps fw * update commit_ref old-commit-hash: 2da6bb482e37c3c75982521d7c4f6698034d9579
This commit is contained in:
@@ -50,7 +50,7 @@ class CarController():
|
||||
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.steeringAngle) < 90.
|
||||
lkas_active = enabled and abs(CS.out.steeringAngle) < CS.CP.maxSteerAngle
|
||||
|
||||
# fix for Genesis hard fault at low speed
|
||||
if CS.out.vEgo < 16.7 and self.car_fingerprint == CAR.HYUNDAI_GENESIS:
|
||||
|
||||
@@ -27,6 +27,13 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerLimitTimer = 0.4
|
||||
tire_stiffness_factor = 1.
|
||||
|
||||
ret.maxSteerAngle = 90.
|
||||
|
||||
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
|
||||
@@ -58,6 +65,8 @@ 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.maxSteerAngle = 1000.
|
||||
elif candidate in [CAR.ELANTRA, CAR.ELANTRA_GT_I30]:
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
ret.mass = 1275. + STD_CARGO_KG
|
||||
|
||||
@@ -1 +1 @@
|
||||
1043cab3ddb1b4b8d5d32a7a0c1a78af9e4f90b7
|
||||
3964f847c722e6e6a4b3876bbe9e9c8a354fb7f8
|
||||
|
||||
Reference in New Issue
Block a user