From efd32b6f42a5d21dfe0c3a8580af2155240755d1 Mon Sep 17 00:00:00 2001 From: JamesL787 <49109285+JamesL787@users.noreply.github.com> Date: Sun, 18 Oct 2026 10:24:28 -0400 Subject: [PATCH] honda: send the Civic Bosch and Insight 3840 E4 per unit, their EPS firmware's command clamp The Civic Bosch (TBA-C020, TBA-C120, TGG-A120) and Insight (TXM-A040) EPS firmware clamps its command input at key 1663, which is E4 3840: stock firmware and PTM builds alike (the PTM builds keep the stock E4 decode; read from the stock images). Both platforms were sent 4096, so the last ~6% of the request did nothing, and the controller's saturation and output-based thresholds were scaled 6.7% off the firmware. HONDA_CIVIC_BOSCH and HONDA_INSIGHT now get 3840, as the Clarity and the Nidec Civic already do. The diesel Civic (no image read) and the CR-V (whose EPS clamps at 1774 = 4096) keep 4096. The request only shrinks; no limit grows. Co-Authored-By: Claude Opus 5.5 --- opendbc/sunnypilot/car/honda/interface_ext.py | 8 ++++++-- opendbc/sunnypilot/car/honda/test_honda.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/opendbc/sunnypilot/car/honda/interface_ext.py b/opendbc/sunnypilot/car/honda/interface_ext.py index 344aad740e6..3e2f606db12 100644 --- a/opendbc/sunnypilot/car/honda/interface_ext.py +++ b/opendbc/sunnypilot/car/honda/interface_ext.py @@ -13,12 +13,16 @@ CAR.HONDA_INSIGHT, }) +# 0xE4 per unit of output: the EPS's own command clamp. The Clarity, Civic (Nidec and Bosch) and Insight EPS firmware +# clamps its command input at key 1663 = E4 3840, stock firmware and PTM builds alike (the PTM builds keep the stock +# E4 decode; read from the stock TRW, TBA-A030, TEG-A010, TBA-C020, TBA-C120, TGG-A120 and TXM-A040 images), so above +# 3840 the request did nothing. The CR-V's (TLA) clamps at 1774 = E4 4096. _EXTENDED_TORQUE_LIMITS = { CAR.HONDA_CLARITY: 3840, CAR.HONDA_CIVIC: 3840, - CAR.HONDA_CIVIC_BOSCH: 4096, + CAR.HONDA_CIVIC_BOSCH: 3840, CAR.HONDA_CIVIC_BOSCH_DIESEL: 4096, - CAR.HONDA_INSIGHT: 4096, + CAR.HONDA_INSIGHT: 3840, CAR.HONDA_NBOX_2G: 4096, CAR.HONDA_CRV_5G: 4096, } diff --git a/opendbc/sunnypilot/car/honda/test_honda.py b/opendbc/sunnypilot/car/honda/test_honda.py index 2d9dfeabe83..084e086f7f3 100644 --- a/opendbc/sunnypilot/car/honda/test_honda.py +++ b/opendbc/sunnypilot/car/honda/test_honda.py @@ -75,11 +75,11 @@ def test_torque_mod_static_pid_tune(self, car_name): torque_limits = { CAR.HONDA_CIVIC: 3840, - CAR.HONDA_CIVIC_BOSCH: 4096, + CAR.HONDA_CIVIC_BOSCH: 3840, CAR.HONDA_CIVIC_BOSCH_DIESEL: 4096, CAR.HONDA_CLARITY: 3840, CAR.HONDA_CRV_5G: 4096, - CAR.HONDA_INSIGHT: 4096, + CAR.HONDA_INSIGHT: 3840, } if car_name in torque_limits: torque_limit = torque_limits[car_name]