From 48fa8ffb33dbc49d441519f3d496441a65e8a066 Mon Sep 17 00:00:00 2001 From: Jason Young <46612682+jyoung8607@users.noreply.github.com> Date: Tue, 30 Mar 2021 17:49:46 -0400 Subject: [PATCH] VW MQB: Update to Audi A3 Mk3 (#20489) * Add A3 and A3 e-tron FPv2 * Update README * Catch up with model renaming * Trim duplicate FW values * Add 2014 A3 (bankster) * Update model-year range * Revert more model name changes * Revert more model name changes * More FW for 2017 A3 e-tron (fastzeek) * Update A3 models and packages in README * Update A3 packages again * AUDI_A3 -> AUDI_A3_MK3 * Update test route reference * CAN valid should pass for VW now * Update process_replay route * Expand tested A3 range (we have known 2014-15,17) * Revert "CAN valid should pass for VW now" This reverts commit 73a4b4886f572045ada05cd13e60790ca3e17a94. * revert route changes and update refs * update refs again Co-authored-by: Adeeb Shihadeh --- README.md | 3 +- selfdrive/car/volkswagen/interface.py | 8 +-- selfdrive/car/volkswagen/values.py | 50 +++++++++++-------- selfdrive/test/process_replay/ref_commit | 2 +- .../test/process_replay/test_processes.py | 2 +- selfdrive/test/test_car_models.py | 2 +- 6 files changed, 39 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 9fb6c3836f..266e1374a7 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,8 @@ Community Maintained Cars and Features | Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below | | ----------| ------------------------------| ------------------| -----------------| -------------------| -------------| -| Audi | A3 2015, 2017 | Prestige | Stock | 0mph | 0mph | +| Audi | A3 2014-17 | Prestige | Stock | 0mph | 0mph | +| Audi | A3 Sportback e-tron 2017-18 | Prestige | Stock | 0mph | 0mph | | Buick | Regal 20181 | Adaptive Cruise | openpilot | 0mph | 7mph | | Cadillac | ATS 20181 | Adaptive Cruise | openpilot | 0mph | 7mph | | Chevrolet | Malibu 20171 | Adaptive Cruise | openpilot | 0mph | 7mph | diff --git a/selfdrive/car/volkswagen/interface.py b/selfdrive/car/volkswagen/interface.py index 11c8fae491..eb6352b762 100644 --- a/selfdrive/car/volkswagen/interface.py +++ b/selfdrive/car/volkswagen/interface.py @@ -77,10 +77,10 @@ class CarInterface(CarInterfaceBase): ret.mass = 1715 + STD_CARGO_KG ret.wheelbase = 2.74 - elif candidate == CAR.AUDI_A3: - # Temporarily carry forward old tuning values while we test vehicle identification - ret.mass = 1500 + STD_CARGO_KG - ret.wheelbase = 2.64 + elif candidate == CAR.AUDI_A3_MK3: + # Averages of all 8V A3 variants + ret.mass = 1335 + STD_CARGO_KG + ret.wheelbase = 2.61 elif candidate == CAR.SEAT_ATECA_MK1: # Averages of all 5F Ateca variants diff --git a/selfdrive/car/volkswagen/values.py b/selfdrive/car/volkswagen/values.py index 8d85cb47a7..8ba3ba8ac1 100644 --- a/selfdrive/car/volkswagen/values.py +++ b/selfdrive/car/volkswagen/values.py @@ -59,11 +59,11 @@ class CAR: JETTA_MK7 = "VOLKSWAGEN JETTA 7TH GEN" # Chassis BU, Mk7 Jetta PASSAT_MK8 = "VOLKSWAGEN PASSAT 8TH GEN" # Chassis 3G, Mk8 Passat and variants TIGUAN_MK2 = "VOLKSWAGEN TIGUAN 2ND GEN" # Chassis AD/BW, Mk2 VW Tiguan and variants + AUDI_A3_MK3 = "AUDI A3 3RD GEN" # Chassis 8V/FF, Mk3 Audi A3 and variants SEAT_ATECA_MK1 = "SEAT ATECA 1ST GEN" # Chassis 5F, Mk1 SEAT Ateca and CUPRA Ateca SKODA_KODIAQ_MK1 = "SKODA KODIAQ 1ST GEN" # Chassis NS, Mk1 Skoda Kodiaq SKODA_SCALA_MK1 = "SKODA SCALA 1ST GEN" # Chassis NW, Mk1 Skoda Scala and Skoda Kamiq SKODA_SUPERB_MK3 = "SKODA SUPERB 3RD GEN" # Chassis 3V/NP, Mk3 Skoda Superb and variants - AUDI_A3 = "AUDI A3" # Chassis 8V/FF, Mk3 Audi A3 and variants FINGERPRINTS = { CAR.GOLF_MK7: [{ @@ -78,7 +78,7 @@ FINGERPRINTS = { CAR.TIGUAN_MK2: [{ 64: 8, 134: 8, 159: 8, 173: 8, 178: 8, 253: 8, 257: 8, 260: 8, 262: 8, 278: 8, 279: 8, 283: 8, 286: 8, 288: 8, 289: 8, 290: 8, 294: 8, 299: 8, 302: 8, 346: 8, 376: 8, 418: 8, 427: 8, 573: 8, 679: 8, 681: 8, 684: 8, 695: 8, 779: 8, 780: 8, 783: 8, 787: 8, 788: 8, 789: 8, 792: 8, 795: 8, 804: 8, 806: 8, 807: 8, 808: 8, 809: 8, 828: 8, 870: 8, 879: 8, 884: 8, 888: 8, 891: 8, 896: 8, 897: 8, 898: 8, 901: 8, 913: 8, 917: 8, 919: 8, 949: 8, 958: 8, 960: 4, 981: 8, 987: 8, 988: 8, 991: 8, 997: 8, 1000: 8, 1019: 8, 1122: 8, 1123: 8, 1124: 8, 1153: 8, 1156: 8, 1157: 8, 1158: 8, 1162: 8, 1175: 8, 1312: 8, 1343: 8, 1385: 8, 1413: 8, 1440: 5, 1471: 4, 1514: 8, 1515: 8, 1520: 8, 1600: 8, 1601: 8, 1603: 8, 1605: 8, 1624: 8, 1626: 8, 1629: 8, 1631: 8, 1635: 8, 1646: 8, 1648: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8 }], - CAR.AUDI_A3: [{ + CAR.AUDI_A3_MK3: [{ 64: 8, 134: 8, 159: 8, 173: 8, 178: 8, 253: 8, 257: 8, 260: 8, 262: 8, 278: 8, 279: 8, 283: 8, 285: 8, 286: 8, 288: 8, 289: 8, 290: 8, 294: 8, 295: 8, 299: 8, 302: 8, 346: 8, 418: 8, 427: 8, 506: 8, 679: 8, 681: 8, 695: 8, 779: 8, 780: 8, 783: 8, 787: 8, 788: 8, 789: 8, 792: 8, 802: 8, 804: 8, 806: 8, 807: 8, 808: 8, 809: 8, 846: 8, 847: 8, 870: 8, 896: 8, 897: 8, 898: 8, 901: 8, 917: 8, 919: 8, 949: 8, 958: 8, 960: 4, 981: 8, 987: 8, 988: 8, 991: 8, 997: 8, 1000: 8, 1019: 8, 1122: 8, 1123: 8, 1124: 8, 1153: 8, 1162: 8, 1175: 8, 1312: 8, 1385: 8, 1413: 8, 1440: 5, 1514: 8, 1515: 8, 1520: 8, 1600: 8, 1601: 8, 1603: 8, 1624: 8, 1629: 8, 1631: 8, 1646: 8, 1648: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8, 1792: 8, 1872: 8, 1976: 8, 1977: 8, 1982: 8, 1985: 8 }], CAR.SEAT_ATECA_MK1: [{ @@ -98,23 +98,6 @@ FINGERPRINTS = { IGNORED_FINGERPRINTS = [CAR.JETTA_MK7, CAR.PASSAT_MK8, CAR.TIGUAN_MK2, CAR.SEAT_ATECA_MK1, CAR.SKODA_KODIAQ_MK1, CAR.SKODA_SCALA_MK1, CAR.SKODA_SUPERB_MK3] FW_VERSIONS = { - CAR.AUDI_A3: { - (Ecu.engine, 0x7e0, None): [ - b'\xf1\x875G0906259L \xf1\x890002', - ], - (Ecu.transmission, 0x7e1, None): [ - b'\xf1\x870D9300013B \xf1\x894931', - ], - (Ecu.srs, 0x715, None): [ - b'\xf1\x875Q0959655J \xf1\x890830\xf1\x82\023121111111211--261117141112231291163221', - ], - (Ecu.eps, 0x712, None): [ - b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\00521G00807A1', - ], - (Ecu.fwdRadar, 0x757, None): [ - b'\xf1\x875Q0907572G \xf1\x890571', - ], - }, CAR.GOLF_MK7: { (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704E906016A \xf1\x897697', @@ -254,6 +237,33 @@ FW_VERSIONS = { b'\xf1\x872Q0907572R \xf1\x890372', ], }, + CAR.AUDI_A3_MK3: { + (Ecu.engine, 0x7e0, None): [ + b'\xf1\x878V0906264B \xf1\x890003', + b'\xf1\x875G0906259L \xf1\x890002', + b'\xf1\x8704E906023AN\xf1\x893695', + b'\xf1\x8704E906023BL\xf1\x895190', + ], + (Ecu.transmission, 0x7e1, None): [ + b'\xf1\x870CW300048 \xf1\x895201', + b'\xf1\x870D9300013B \xf1\x894931', + b'\xf1\x870DD300046A \xf1\x891602', + b'\xf1\x870DD300046G \xf1\x891601', + ], + (Ecu.srs, 0x715, None): [ + b'\xf1\x875Q0959655N \xf1\x890361\xf1\x82\0211212001112111104110411111521159114', + b'\xf1\x875Q0959655J \xf1\x890830\xf1\x82\023121111111211--261117141112231291163221', + b'\xf1\x875Q0959655J \xf1\x890830\xf1\x82\x13121111111111--341117141212231291163221', + ], + (Ecu.eps, 0x712, None): [ + b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\00503G00803A0', + b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\00521G00807A1', + ], + (Ecu.fwdRadar, 0x757, None): [ + b'\xf1\x875Q0907572D \xf1\x890304\xf1\x82\00101', + b'\xf1\x875Q0907572G \xf1\x890571', + ], + }, CAR.SEAT_ATECA_MK1: { (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704E906027KA\xf1\x893749', @@ -330,7 +340,7 @@ DBC = { CAR.JETTA_MK7: dbc_dict('vw_mqb_2010', None), CAR.PASSAT_MK8: dbc_dict('vw_mqb_2010', None), CAR.TIGUAN_MK2: dbc_dict('vw_mqb_2010', None), - CAR.AUDI_A3: dbc_dict('vw_mqb_2010', None), + CAR.AUDI_A3_MK3: dbc_dict('vw_mqb_2010', None), CAR.SEAT_ATECA_MK1: dbc_dict('vw_mqb_2010', None), CAR.SKODA_KODIAQ_MK1: dbc_dict('vw_mqb_2010', None), CAR.SKODA_SCALA_MK1: dbc_dict('vw_mqb_2010', None), diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 6b6c6f646d..420174b6a7 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -28d5abf03e0e0cae5af0f3dfb78f597253046a8b \ No newline at end of file +3d5755261e5807d695b4a7e1c33c27a5baed4606 \ No newline at end of file diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index d5518269ba..2eceb5e859 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -21,7 +21,7 @@ segments = [ ("SUBARU", "4d70bc5e608678be|2021-01-15--17-02-04--5"), # SUBARU.IMPREZA ("GM", "ae3ed0eb20960a20|2021-01-15--15-04-06--8"), # GM.VOLT ("NISSAN", "e4d79cf6b8b19a0d|2021-01-17--14-48-08--7"), # NISSAN.XTRAIL - ("VOLKSWAGEN", "e2a273d7e6eecec2|2021-03-03--16-05-26--4"), # VW.AUDI_A3 + ("VOLKSWAGEN", "4634226ed41b59ea|2021-03-26--14-14-18--14"), # VW.AUDI_A3_MK3 # Enable when port is tested and dascamOnly is no longer set #("MAZDA", "32a319f057902bb3|2020-04-27--15-18-58--2"), # MAZDA.CX5 diff --git a/selfdrive/test/test_car_models.py b/selfdrive/test/test_car_models.py index 8d777c52fc..d52b8cf91d 100755 --- a/selfdrive/test/test_car_models.py +++ b/selfdrive/test/test_car_models.py @@ -454,7 +454,7 @@ routes = { 'enableCamera': True, }, "07667b885add75fd|2021-01-23--19-48-42": { - 'carFingerprint': VOLKSWAGEN.AUDI_A3, + 'carFingerprint': VOLKSWAGEN.AUDI_A3_MK3, 'enableCamera': True, }, "8f205bdd11bcbb65|2021-03-26--01-00-17": {