From 836636498db31de184e2ae38b931f3f720ae3b0b Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Thu, 9 May 2024 22:20:14 -0700 Subject: [PATCH] FrogPilot community - EPS mod - 17'-22' - Select Bosch civic's Co-Authored-By: cfranyota <46506059+cfranyota@users.noreply.github.com> --- selfdrive/car/honda/fingerprints.py | 10 ++++++++++ selfdrive/car/honda/interface.py | 8 ++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/honda/fingerprints.py b/selfdrive/car/honda/fingerprints.py index 5296a91..6b2c83b 100644 --- a/selfdrive/car/honda/fingerprints.py +++ b/selfdrive/car/honda/fingerprints.py @@ -407,6 +407,16 @@ FW_VERSIONS = { b'39990-TGG-J510\x00\x00', b'39990-TGL-E130\x00\x00', b'39990-TGN-E120\x00\x00', + #modded EPS bosch civic fw list + b'39990-TBA,C020\x00\x00', + b'39990-TBA,C120\x00\x00', + b'39990-TEA,T820\x00\x00', + b'39990-TEZ,T020\x00\x00', + b'39990-TGG,A020\x00\x00', + b'39990-TGG,A120\x00\x00', + b'39990-TGG,J510\x00\x00', + b'39990-TGL,E130\x00\x00', + b'39990-TGN,E120\x00\x00', ], (Ecu.srs, 0x18da53f1, None): [ b'77959-TBA-A060\x00\x00', diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 935764c..8797687 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -108,8 +108,12 @@ class CarInterface(CarInterfaceBase): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[1.1], [0.33]] elif candidate in (CAR.CIVIC_BOSCH, CAR.CIVIC_BOSCH_DIESEL, CAR.CIVIC_2022): - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] + if eps_modified: + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2564, 8000], [0, 2564, 3840]] + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.09]] # 2.5x Modded EPS + else: + ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] elif candidate == CAR.ACCORD: ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end