Hyundai: add Kia Niro PHEV (2023-25, 2nd gen)#3374
Hyundai: add Kia Niro PHEV (2023-25, 2nd gen)#3374santiagolgzz wants to merge 4 commits intocommaai:masterfrom
Conversation
Adds the 2nd-gen Kia Niro Plug-in Hybrid as a CAN FD platform: - New KIA_NIRO_PHEV_2ND_GEN platform, hyundai_a harness, CarSpecs taken from Kia 2023 Niro PHEV (mass=3336 lb, wheelbase=2.72 m, steerRatio=13.3, tireStiffnessFactor=0.385). - Fingerprints for camera, radar, EPS, and transmission. - Added to CANFD_FUZZY_WHITELIST. The EPS part number (56310-AT150) encodes into the platform code as SG2-AT150, which uniquely disambiguates from the HEV variant's 56310-AT050 at the fuzzy-match layer. HEV is intentionally not whitelisted yet — its EPS fingerprint has not been collected, so its expected platform codes are still only cam+radar (byte-identical to PHEV's). A TODO marks the follow-up. - Torque override entry [2.5, 2.5, 0.1], the established Kia CAN-FD baseline shared with Sorento HEV, K8 HEV, and Kona EV. - Listed in non_tested_cars as a placeholder until a drive captured with this branch loaded (fingerprinting as PHEV) is uploaded.
Both KIA_NIRO_EV_2ND_GEN and KIA_NIRO_HEV_2ND_GEN were inheriting KIA_NIRO_EV.specs (the 1st-gen EV's CarSpecs), which gave them an incorrect mass (3543 lb instead of their actual curb weights), a slightly off wheelbase (2.7 m instead of 2.72 m), and a steerRatio that didn't match either 2nd-gen variant. Replaces the inherited references with explicit per-variant CarSpecs: - KIA_NIRO_EV_2ND_GEN: mass=3721 lb, wheelbase=2.72 m, steerRatio=13.3 - KIA_NIRO_HEV_2ND_GEN: mass=3071 lb, wheelbase=2.72 m, steerRatio=13.7 tireStiffnessFactor stays at 0.385 for both (carried over from the 1st-gen EV — same SG2 chassis and tire family). Sources: Kia Media 2023 Niro spec sheets.
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
Car behavior reportReplays driving segments through this PR and compares the behavior to master. Testing 260 segments for: HYUNDAI_AZERA_HEV_6TH_GEN, HYUNDAI_ELANTRA_GT_I30, HYUNDAI_ELANTRA_2021, HYUNDAI_ELANTRA_HEV_2021, HYUNDAI_GENESIS, HYUNDAI_IONIQ, HYUNDAI_IONIQ_HEV_2022, HYUNDAI_IONIQ_EV_2020, HYUNDAI_IONIQ_PHEV_2019, HYUNDAI_IONIQ_PHEV, HYUNDAI_KONA_2022, HYUNDAI_KONA_EV, HYUNDAI_KONA_EV_2022, HYUNDAI_KONA_EV_2ND_GEN, HYUNDAI_SANTA_FE, HYUNDAI_SANTA_FE_2022, HYUNDAI_SANTA_FE_HEV_2022, HYUNDAI_SANTA_FE_PHEV_2022, HYUNDAI_SONATA, HYUNDAI_SONATA_LF, HYUNDAI_STARIA_4TH_GEN, HYUNDAI_PALISADE, HYUNDAI_SONATA_HYBRID, HYUNDAI_IONIQ_5, HYUNDAI_IONIQ_6, HYUNDAI_TUCSON_4TH_GEN, HYUNDAI_SANTA_CRUZ_1ST_GEN, HYUNDAI_CUSTIN_1ST_GEN ✅ 0 changed, 260 passed, 0 errors |
Summary
Adds a separate Hyundai CAN-FD platform for the 2023-25 Kia Niro Plug-in Hybrid instead of letting it alias to the 2nd-gen Niro Hybrid.
This includes:
KIA_NIRO_PHEV_2ND_GENEvidence
Observed on the vehicle/comma:
CarParamsPersistentfingerprints asKIA_NIRO_PHEV_2ND_GEN9369c137569c2483/00000004--3879667fb5KIA_NIRO_PHEV_2ND_GENRepresentative firmware differentiators:
SG2 MDPS C A.00 1.02 56310AT150 4SGPC102SG2PHEV ATCPSBG2552 D121092 ... BSG2G16XXP092NS7ESource for PHEV, EV, HEV car specs:
https://www.kiamedia.com/us/en/models/niro-phev/2023/specifications
https://www.kiamedia.com/us/en/models/niro-ev/2023/specifications
https://www.kiamedia.com/us/en/models/niro/2023/specifications