From 16bb4a9ccd1fe07d5a90aae719873e4bfc8e4d65 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 9 Apr 2024 21:00:56 -0700 Subject: [PATCH] Volkswagen: combine platforms with common chassis codes (#32147) * fix curb weight for Ateca to match Leon better https://www.auto-data.net/en/seat-ateca-i-1.6-tdi-115hp-start-stop-23096 https://www.seat.com/content/dam/public/seat-website/car-shopping-tools/brochure-download/brochures/ateca/cars-specs-brochure-KH7-NA-december-2018.pdf * combine leon and ateca * combine fw * migrate * great, both use same torque params * scala and kamiq * remove duplicates * fix * fix! --- selfdrive/car/fingerprints.py | 6 ++- selfdrive/car/tests/routes.py | 4 +- selfdrive/car/torque_data/substitute.toml | 2 - selfdrive/car/volkswagen/fingerprints.py | 51 ++++++----------------- selfdrive/car/volkswagen/values.py | 23 +++++----- 5 files changed, 28 insertions(+), 58 deletions(-) diff --git a/selfdrive/car/fingerprints.py b/selfdrive/car/fingerprints.py index 978d2260d64ac2..9be6dc8de6fb16 100644 --- a/selfdrive/car/fingerprints.py +++ b/selfdrive/car/fingerprints.py @@ -331,13 +331,15 @@ def all_legacy_fingerprint_cars(): "AUDI Q2 1ST GEN": VW.AUDI_Q2_MK1, "AUDI Q3 2ND GEN": VW.AUDI_Q3_MK2, "SEAT ATECA 1ST GEN": VW.SEAT_ATECA_MK1, - "SEAT LEON 3RD GEN": VW.SEAT_LEON_MK3, + "SEAT LEON 3RD GEN": VW.SEAT_ATECA_MK1, + "SEAT_LEON_MK3": VW.SEAT_ATECA_MK1, "SKODA FABIA 4TH GEN": VW.SKODA_FABIA_MK4, "SKODA KAMIQ 1ST GEN": VW.SKODA_KAMIQ_MK1, "SKODA KAROQ 1ST GEN": VW.SKODA_KAROQ_MK1, "SKODA KODIAQ 1ST GEN": VW.SKODA_KODIAQ_MK1, "SKODA OCTAVIA 3RD GEN": VW.SKODA_OCTAVIA_MK3, - "SKODA SCALA 1ST GEN": VW.SKODA_SCALA_MK1, + "SKODA SCALA 1ST GEN": VW.SKODA_KAMIQ_MK1, + "SKODA_SCALA_MK1": VW.SKODA_KAMIQ_MK1, "SKODA SUPERB 3RD GEN": VW.SKODA_SUPERB_MK3, "mock": MOCK.MOCK, diff --git a/selfdrive/car/tests/routes.py b/selfdrive/car/tests/routes.py index 036f39c1f35df3..ae76268d38ed93 100755 --- a/selfdrive/car/tests/routes.py +++ b/selfdrive/car/tests/routes.py @@ -248,13 +248,13 @@ class CarTestRoute(NamedTuple): CarTestRoute("6c6b466346192818|2021-06-06--14-17-47", VOLKSWAGEN.AUDI_Q2_MK1), CarTestRoute("0cd0b7f7e31a3853|2021-12-03--03-12-05", VOLKSWAGEN.AUDI_Q3_MK2), CarTestRoute("8f205bdd11bcbb65|2021-03-26--01-00-17", VOLKSWAGEN.SEAT_ATECA_MK1), - CarTestRoute("fc6b6c9a3471c846|2021-05-27--13-39-56", VOLKSWAGEN.SEAT_LEON_MK3), + CarTestRoute("fc6b6c9a3471c846|2021-05-27--13-39-56", VOLKSWAGEN.SEAT_ATECA_MK1), # Leon CarTestRoute("0bbe367c98fa1538|2023-03-04--17-46-11", VOLKSWAGEN.SKODA_FABIA_MK4), CarTestRoute("12d6ae3057c04b0d|2021-09-15--00-04-07", VOLKSWAGEN.SKODA_KAMIQ_MK1), CarTestRoute("12d6ae3057c04b0d|2021-09-04--21-21-21", VOLKSWAGEN.SKODA_KAROQ_MK1), CarTestRoute("90434ff5d7c8d603|2021-03-15--12-07-31", VOLKSWAGEN.SKODA_KODIAQ_MK1), CarTestRoute("66e5edc3a16459c5|2021-05-25--19-00-29", VOLKSWAGEN.SKODA_OCTAVIA_MK3), - CarTestRoute("026b6d18fba6417f|2021-03-26--09-17-04", VOLKSWAGEN.SKODA_SCALA_MK1), + CarTestRoute("026b6d18fba6417f|2021-03-26--09-17-04", VOLKSWAGEN.SKODA_KAMIQ_MK1), # Scala CarTestRoute("b2e9858e29db492b|2021-03-26--16-58-42", VOLKSWAGEN.SKODA_SUPERB_MK3), CarTestRoute("3c8f0c502e119c1c|2020-06-30--12-58-02", SUBARU.SUBARU_ASCENT), diff --git a/selfdrive/car/torque_data/substitute.toml b/selfdrive/car/torque_data/substitute.toml index 22ee134ae374aa..8724a08010e3b0 100644 --- a/selfdrive/car/torque_data/substitute.toml +++ b/selfdrive/car/torque_data/substitute.toml @@ -58,7 +58,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "SKODA_FABIA_MK4" = "VOLKSWAGEN_GOLF_MK7" "SKODA_OCTAVIA_MK3" = "SKODA_SUPERB_MK3" -"SKODA_SCALA_MK1" = "SKODA_SUPERB_MK3" "SKODA_KODIAQ_MK1" = "SKODA_SUPERB_MK3" "SKODA_KAROQ_MK1" = "SKODA_SUPERB_MK3" "SKODA_KAMIQ_MK1" = "SKODA_SUPERB_MK3" @@ -70,7 +69,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "AUDI_Q2_MK1" = "VOLKSWAGEN_TIGUAN_MK2" "VOLKSWAGEN_TAOS_MK1" = "VOLKSWAGEN_TIGUAN_MK2" "VOLKSWAGEN_POLO_MK6" = "VOLKSWAGEN_GOLF_MK7" -"SEAT_LEON_MK3" = "VOLKSWAGEN_GOLF_MK7" "SEAT_ATECA_MK1" = "VOLKSWAGEN_GOLF_MK7" "SUBARU_CROSSTREK_HYBRID" = "SUBARU_IMPREZA_2020" diff --git a/selfdrive/car/volkswagen/fingerprints.py b/selfdrive/car/volkswagen/fingerprints.py index 39fc910ae96bbc..707d96d739d133 100644 --- a/selfdrive/car/volkswagen/fingerprints.py +++ b/selfdrive/car/volkswagen/fingerprints.py @@ -874,22 +874,6 @@ CAR.SEAT_ATECA_MK1: { (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704E906027KA\xf1\x893749', - ], - (Ecu.transmission, 0x7e1, None): [ - b'\xf1\x870D9300014S \xf1\x895202', - ], - (Ecu.srs, 0x715, None): [ - b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1212001211001305121211052900', - ], - (Ecu.eps, 0x712, None): [ - b'\xf1\x873Q0909144L \xf1\x895081\xf1\x82\x0571N60511A1', - ], - (Ecu.fwdRadar, 0x757, None): [ - b'\xf1\x872Q0907572M \xf1\x890233', - ], - }, - CAR.SEAT_LEON_MK3: { - (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704L906021EL\xf1\x897542', b'\xf1\x8704L906026BP\xf1\x891198', b'\xf1\x8704L906026BP\xf1\x897608', @@ -903,6 +887,7 @@ b'\xf1\x870CW300041D \xf1\x891004', b'\xf1\x870CW300041G \xf1\x891003', b'\xf1\x870CW300050J \xf1\x891908', + b'\xf1\x870D9300014S \xf1\x895202', b'\xf1\x870D9300042M \xf1\x895016', b'\xf1\x870GC300043A \xf1\x892304', ], @@ -910,11 +895,13 @@ b'\xf1\x873Q0959655AC\xf1\x890189\xf1\x82\r11110011110011021511110200', b'\xf1\x873Q0959655AS\xf1\x890200\xf1\x82\r11110011110011021511110200', b'\xf1\x873Q0959655AS\xf1\x890200\xf1\x82\r12110012120012021612110200', + b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1212001211001305121211052900', b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1312001313001305171311052900', b'\xf1\x873Q0959655BH\xf1\x890712\xf1\x82\x0e1312001313001305171311052900', b'\xf1\x873Q0959655CM\xf1\x890720\xf1\x82\x0e1312001313001305171311052900', ], (Ecu.eps, 0x712, None): [ + b'\xf1\x873Q0909144L \xf1\x895081\xf1\x82\x0571N60511A1', b'\xf1\x875Q0909144AA\xf1\x891081\xf1\x82\x0521N01842A1', b'\xf1\x875Q0909144AB\xf1\x891082\xf1\x82\x0521N01342A1', b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\x0511N01805A0', @@ -922,6 +909,7 @@ b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\x0521N05808A1', ], (Ecu.fwdRadar, 0x757, None): [ + b'\xf1\x872Q0907572M \xf1\x890233', b'\xf1\x875Q0907572B \xf1\x890200\xf1\x82\x0101', b'\xf1\x875Q0907572H \xf1\x890620', b'\xf1\x875Q0907572K \xf1\x890402\xf1\x82\x0101', @@ -948,15 +936,22 @@ }, CAR.SKODA_KAMIQ_MK1: { (Ecu.engine, 0x7e0, None): [ + b'\xf1\x8704C906025AK\xf1\x897053', b'\xf1\x8705C906032M \xf1\x891333', + b'\xf1\x8705C906032M \xf1\x892365', b'\xf1\x8705E906013CK\xf1\x892540', ], (Ecu.transmission, 0x7e1, None): [ b'\xf1\x870CW300020 \xf1\x891906', + b'\xf1\x870CW300020 \xf1\x891907', b'\xf1\x870CW300020T \xf1\x892204', + b'\xf1\x870CW300050 \xf1\x891709', ], (Ecu.srs, 0x715, None): [ + b'\xf1\x872Q0959655AJ\xf1\x890250\xf1\x82\x1211110411110411--04040404131111112H14', + b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x12111104111104112104040404111111112H14', b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x122221042111042121040404042E2711152H14', + b'\xf1\x872Q0959655AS\xf1\x890411\xf1\x82\x1311150411110411210404040417151215391413', b'\xf1\x872Q0959655BJ\xf1\x890412\xf1\x82\x132223042111042121040404042B251215391423', ], (Ecu.eps, 0x712, None): [ @@ -965,6 +960,7 @@ ], (Ecu.fwdRadar, 0x757, None): [ b'\xf1\x872Q0907572AA\xf1\x890396', + b'\xf1\x872Q0907572R \xf1\x890372', b'\xf1\x872Q0907572T \xf1\x890383', ], }, @@ -1117,29 +1113,6 @@ b'\xf1\x875Q0907572R \xf1\x890771', ], }, - CAR.SKODA_SCALA_MK1: { - (Ecu.engine, 0x7e0, None): [ - b'\xf1\x8704C906025AK\xf1\x897053', - b'\xf1\x8705C906032M \xf1\x892365', - ], - (Ecu.transmission, 0x7e1, None): [ - b'\xf1\x870CW300020 \xf1\x891907', - b'\xf1\x870CW300050 \xf1\x891709', - ], - (Ecu.srs, 0x715, None): [ - b'\xf1\x872Q0959655AJ\xf1\x890250\xf1\x82\x1211110411110411--04040404131111112H14', - b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x12111104111104112104040404111111112H14', - b'\xf1\x872Q0959655AS\xf1\x890411\xf1\x82\x1311150411110411210404040417151215391413', - ], - (Ecu.eps, 0x712, None): [ - b'\xf1\x872Q1909144AB\xf1\x896050', - b'\xf1\x872Q1909144M \xf1\x896041', - ], - (Ecu.fwdRadar, 0x757, None): [ - b'\xf1\x872Q0907572AA\xf1\x890396', - b'\xf1\x872Q0907572R \xf1\x890372', - ], - }, CAR.SKODA_SUPERB_MK3: { (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704E906027BS\xf1\x892887', diff --git a/selfdrive/car/volkswagen/values.py b/selfdrive/car/volkswagen/values.py index 386cbf43f2bf42..c4e037d9c5f013 100644 --- a/selfdrive/car/volkswagen/values.py +++ b/selfdrive/car/volkswagen/values.py @@ -174,7 +174,6 @@ def init_make(self, CP: car.CarParams): # Check the 7th and 8th characters of the VIN before adding a new CAR. If the # chassis code is already listed below, don't add a new CAR, just add to the # FW_VERSIONS for that existing CAR. -# Exception: SEAT Leon and SEAT Ateca share a chassis code class CAR(Platforms): VOLKSWAGEN_ARTEON_MK1 = VolkswagenMQBPlatformConfig( # Chassis AN @@ -307,20 +306,22 @@ class CAR(Platforms): VolkswagenCarSpecs(mass=1623, wheelbase=2.68), ) SEAT_ATECA_MK1 = VolkswagenMQBPlatformConfig( # Chassis 5F - [VWCarDocs("SEAT Ateca 2018")], - VolkswagenCarSpecs(mass=1900, wheelbase=2.64), - ) - SEAT_LEON_MK3 = VolkswagenMQBPlatformConfig( # Chassis 5F - [VWCarDocs("SEAT Leon 2014-20")], - VolkswagenCarSpecs(mass=1227, wheelbase=2.64), + [ + VWCarDocs("SEAT Ateca 2018"), + VWCarDocs("SEAT Leon 2014-20"), + ], + VolkswagenCarSpecs(mass=1300, wheelbase=2.64), ) SKODA_FABIA_MK4 = VolkswagenMQBPlatformConfig( # Chassis PJ [VWCarDocs("Škoda Fabia 2022-23", footnotes=[Footnote.VW_MQB_A0])], VolkswagenCarSpecs(mass=1266, wheelbase=2.56), ) SKODA_KAMIQ_MK1 = VolkswagenMQBPlatformConfig( # Chassis NW - [VWCarDocs("Škoda Kamiq 2021-23", footnotes=[Footnote.VW_MQB_A0, Footnote.KAMIQ])], - VolkswagenCarSpecs(mass=1265, wheelbase=2.66), + [ + VWCarDocs("Škoda Kamiq 2021-23", footnotes=[Footnote.VW_MQB_A0, Footnote.KAMIQ]), + VWCarDocs("Škoda Scala 2020-23", footnotes=[Footnote.VW_MQB_A0]), + ], + VolkswagenCarSpecs(mass=1230, wheelbase=2.66), ) SKODA_KAROQ_MK1 = VolkswagenMQBPlatformConfig( # Chassis NU [VWCarDocs("Škoda Karoq 2019-23")], @@ -338,10 +339,6 @@ class CAR(Platforms): ], VolkswagenCarSpecs(mass=1388, wheelbase=2.68), ) - SKODA_SCALA_MK1 = VolkswagenMQBPlatformConfig( # Chassis NW - [VWCarDocs("Škoda Scala 2020-23", footnotes=[Footnote.VW_MQB_A0])], - VolkswagenCarSpecs(mass=1192, wheelbase=2.65), - ) SKODA_SUPERB_MK3 = VolkswagenMQBPlatformConfig( # Chassis 3V/NP [VWCarDocs("Škoda Superb 2015-22")], VolkswagenCarSpecs(mass=1505, wheelbase=2.84),