diff --git a/opendbc/car/honda/fingerprints.py b/opendbc/car/honda/fingerprints.py index 6c378151ac8..477a5cf19ef 100644 --- a/opendbc/car/honda/fingerprints.py +++ b/opendbc/car/honda/fingerprints.py @@ -509,6 +509,30 @@ b'77959-T5R-A230\x00\x00', ], }, + CAR.HONDA_FIT_4G: { + (Ecu.fwdRadar, 0x18dab0f1, None): [ + b'36161-TZK-P140\x00\x00', + b'8S102-TZK-PA20\x00\x00', + b'8S102-TZK-PB10\x00\x00', + ], + (Ecu.transmission, 0x18da1ef1, None): [ + b'28101-60E-F010\x00\x00', + ], + (Ecu.gateway, 0x18daeff1, None): [ + b'38897-TZA-Q010\x00\x00', + b'38897-TZB-U010\x00\x00', + ], + (Ecu.eps, 0x18da30f1, None): [ + b'39990-TZA-E910\x00\x00', + ], + (Ecu.vsa, 0x18da28f1, None): [ + b'57114-TZK-F010\x00\x00', + b'57114-TZL-F010\x00\x00', + ], + (Ecu.srs, 0x18da53f1, None): [ + b'77959-TZA-F120\x00\x00', + ], + }, CAR.HONDA_FREED: { (Ecu.gateway, 0x18daeff1, None): [ b'38897-TDK-J010\x00\x00', diff --git a/opendbc/car/honda/interface.py b/opendbc/car/honda/interface.py index cac1306b666..2e8e47f1a20 100755 --- a/opendbc/car/honda/interface.py +++ b/opendbc/car/honda/interface.py @@ -194,7 +194,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo # When using stock ACC, the radar intercepts and filters steering commands the EPS would otherwise accept ret.minSteerSpeed = 70. * CV.KPH_TO_MS - elif candidate in (CAR.ACURA_TLX_2G_MMR, CAR.ACURA_MDX_4G): + elif candidate in (CAR.ACURA_TLX_2G_MMR, CAR.ACURA_MDX_4G, CAR.HONDA_FIT_4G): ret.steerActuatorDelay = 0.15 ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) @@ -227,11 +227,16 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo # min speed to enable ACC. if car can do stop and go, then set enabling speed # to a negative value, so it won't matter. Otherwise, add 0.5 mph margin to not # conflict with PCM acc - ret.autoResumeSng = candidate in (HONDA_BOSCH | {CAR.HONDA_CIVIC}) + if (candidate == CAR.HONDA_FIT_4G) and (not ret.openpilotLongitudinalControl): + ret.autoResumeSng = False + else: + ret.autoResumeSng = candidate in (HONDA_BOSCH | {CAR.HONDA_CIVIC}) if ret.autoResumeSng: ret.minEnableSpeed = -1. elif candidate == CAR.HONDA_ODYSSEY_TWN: ret.minEnableSpeed = 19. * CV.MPH_TO_MS + elif candidate == CAR.HONDA_FIT_4G: + ret.minEnableSpeed = 30. * CV.KPH_TO_MS else: ret.minEnableSpeed = 25.51 * CV.MPH_TO_MS diff --git a/opendbc/car/honda/values.py b/opendbc/car/honda/values.py index 8a9d6556fac..5f07e823c2e 100644 --- a/opendbc/car/honda/values.py +++ b/opendbc/car/honda/values.py @@ -298,6 +298,16 @@ class CAR(Platforms): [HondaCarDocs("Acura TLX 2025", "All")], CarSpecs(mass=3990 * CV.LB_TO_KG, wheelbase=2.87, centerToFrontRatio=0.43, steerRatio=13.7), ) + HONDA_FIT_4G = HondaBoschPlatformConfig( + [ + HondaCarDocs("Honda Fit (Taiwan) 2021", "All"), + # TODO: add 2022-2023 fingerprints + HondaCarDocs("Honda Fit (Taiwan) 2024-25", "All"), + ], + CarSpecs(mass=1229, wheelbase=2.53, steerRatio=19.7, centerToFrontRatio=0.39, minSteerSpeed=23. * CV.KPH_TO_MS), + {Bus.pt: 'honda_bosch_radarless_generated'}, + flags=HondaFlags.BOSCH_RADARLESS, + ) # Nidec Cars ACURA_ILX = HondaNidecPlatformConfig( diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 2fe80c0f781..842f6194e4f 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -133,6 +133,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("ad9840558640c31d/0000001a--d6cd4871c2", HONDA.ACURA_MDX_4G_MMR), # 2025 MDX CarTestRoute("ad9840558640c31d/000001f2--026c4f6275", HONDA.ACURA_TLX_2G_MMR), CarTestRoute("619b464263ab23f2/00000025--ece505fdfc", HONDA.ACURA_MDX_4G), + CarTestRoute("f0a3de7786dcc72c/0000001a--4336abf007", HONDA.HONDA_FIT_4G), CarTestRoute("87d7f06ade479c2e/2023-09-11--23-30-11", HYUNDAI.HYUNDAI_AZERA_6TH_GEN), CarTestRoute("66189dd8ec7b50e6/2023-09-20--07-02-12", HYUNDAI.HYUNDAI_AZERA_HEV_6TH_GEN), diff --git a/opendbc/car/torque_data/override.toml b/opendbc/car/torque_data/override.toml index f6bab7603f9..0f6a7bae425 100644 --- a/opendbc/car/torque_data/override.toml +++ b/opendbc/car/torque_data/override.toml @@ -101,6 +101,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "JEEP_CHEROKEE_5TH_GEN" = [1.5, 1.5, 0.15] "ACURA_MDX_4G" = [1.4, 1.4, 0.17] "ACURA_RDX_3G_MMR" = [1.5, 1.5, 0.16] +"HONDA_FIT_4G" = [1.3, 1.3, 0.22] # Dashcam or fallback configured as ideal car "MOCK" = [10.0, 10, 0.0]