From a864df6b26d4aa301f5c1c340fa310c41fb27290 Mon Sep 17 00:00:00 2001 From: Kleber Ayala Date: Fri, 25 Sep 2026 13:29:57 -0500 Subject: [PATCH] feat(mazda): fingerprint CX-5 2022-25 built for export markets Japan-built crossovers sold outside North America carry the WMI JM7, which no Mazda platform lists. platform_from_vin finds no candidate for them, and the firmware fallback stops too, since only OCEANIA_EXPORT VINs continue to the EPS-swap path. A 2025 CX-5 with a JM7 VIN therefore never fingerprints, even though its chassis code KF and model year code S already match MAZDA_CX5_2022. Add JM7 as EXPORT_CROSSOVER, accept it on MAZDA_CX5_2022, and add the engine and transmission firmware read from that car. Its EPS, ABS and forward camera versions are already listed. --- opendbc/car/mazda/fingerprints.py | 2 ++ opendbc/car/mazda/values.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opendbc/car/mazda/fingerprints.py b/opendbc/car/mazda/fingerprints.py index 8c01f3d36e9..dcd8a5a7cac 100644 --- a/opendbc/car/mazda/fingerprints.py +++ b/opendbc/car/mazda/fingerprints.py @@ -20,6 +20,7 @@ b'PW67-188K2-E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PW8F-188K2-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PW8G-188K2-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'PWN8-188K2-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PX2C-188K2-G\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PX2D-188K2-G\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PX2D-188K2-H\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', @@ -56,6 +57,7 @@ b'PW66-21PS1-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PW66-21PS1-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PXDL-21PS1-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + b'PXDL-21PS1-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PXFG-21PS1-A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PXFG-21PS1-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'PXGG-21PS1-B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', diff --git a/opendbc/car/mazda/values.py b/opendbc/car/mazda/values.py index 961b4ee70cd..350012ed2f0 100644 --- a/opendbc/car/mazda/values.py +++ b/opendbc/car/mazda/values.py @@ -188,6 +188,8 @@ class WMI(StrEnum): JAPAN_PASSENGER = "JM1" # Japan-built passenger cars JAPAN_CROSSOVER = "JM3" # Japan-built crossovers MEXICO_PASSENGER = "3MZ" # Mazda de Mexico (Mazda 3) + # Japan-built crossovers for markets outside North America. + EXPORT_CROSSOVER = "JM7" # Export VINs without a model-year field use the EPS-swap fallback. OCEANIA_EXPORT = "JM0" @@ -239,7 +241,7 @@ class CAR(Platforms): MAZDA_CX5_2022 = MazdaPlatformConfig( [MazdaCarDocs("Mazda CX-5 2022-25")], MazdaCX5_2022CarSpecs(mass=3728 * CV.LB_TO_KG, wheelbase=2.698, steerRatio=18.1), # 15.5 is factory spec; 18.1 from paramsd learner (2.9M samples) - wmis={WMI.JAPAN_CROSSOVER}, chassis_codes={'KF'}, years={'N', 'P', 'R', 'S'}, # 2022-25 + wmis={WMI.JAPAN_CROSSOVER, WMI.EXPORT_CROSSOVER}, chassis_codes={'KF'}, years={'N', 'P', 'R', 'S'}, # 2022-25 ) MAZDA_CX8_2023 = MazdaPlatformConfig( [MazdaCarDocs("Mazda CX-8 2023")],