From fd6341353087bda77b251939ba0c0e58e1a6b72f Mon Sep 17 00:00:00 2001 From: Jason Young Date: Thu, 18 Nov 2021 10:47:50 -0500 Subject: [PATCH] VW MQB: Volkswagen T-Roc Mk1 --- RELEASES.md | 1 + docs/CARS.md | 1 + selfdrive/car/volkswagen/interface.py | 4 ++++ selfdrive/car/volkswagen/values.py | 18 ++++++++++++++++++ selfdrive/test/test_routes.py | 1 + 5 files changed, 25 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index aabe4254774878..42d5514ff3e115 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,6 @@ Version 0.8.12 (202X-XX-XX) ======================== + * Volkswagen T-Roc 2021 support thanks to jyoung8607! Version 0.8.11 (2021-11-22) ======================== diff --git a/docs/CARS.md b/docs/CARS.md index aa23a85cecb0a6..e2b846c8f180d2 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -162,6 +162,7 @@ | Volkswagen| Passat 2016-183 | Driver Assistance | Stock | 0mph | 0mph | | Volkswagen| Polo 2020 | Driver Assistance | Stock | 0mph | 0mph | | Volkswagen| T-Cross 20214 | Driver Assistance | Stock | 0mph | 0mph | +| Volkswagen| T-Roc 20214 | Driver Assistance | Stock | 0mph | 0mph | | Volkswagen| Taos 20224 | Driver Assistance | Stock | 0mph | 0mph | | Volkswagen| Tiguan 2020 | Driver Assistance | Stock | 0mph | 0mph | | Volkswagen| Touran 2017 | Driver Assistance | Stock | 0mph | 0mph | diff --git a/selfdrive/car/volkswagen/interface.py b/selfdrive/car/volkswagen/interface.py index d5b346f410891d..b8c9c5d67b296d 100644 --- a/selfdrive/car/volkswagen/interface.py +++ b/selfdrive/car/volkswagen/interface.py @@ -103,6 +103,10 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None): ret.wheelbase = 3.00 # SWB, LWB is 3.40, TBD how to detect difference ret.minSteerSpeed = 14.0 + elif candidate == CAR.TROC_MK1: + ret.mass = 1413 + STD_CARGO_KG + ret.wheelbase = 2.63 + elif candidate == CAR.AUDI_A3_MK3: ret.mass = 1335 + STD_CARGO_KG ret.wheelbase = 2.61 diff --git a/selfdrive/car/volkswagen/values.py b/selfdrive/car/volkswagen/values.py index ed0b1ac76d407b..7b3160e62045a7 100755 --- a/selfdrive/car/volkswagen/values.py +++ b/selfdrive/car/volkswagen/values.py @@ -76,6 +76,7 @@ class CAR: TIGUAN_MK2 = "VOLKSWAGEN TIGUAN 2ND GEN" # Chassis AD/BW, Mk2 VW Tiguan and variants TOURAN_MK2 = "VOLKSWAGEN TOURAN 2ND GEN" # Chassis 1T, Mk2 VW Touran and variants TRANSPORTER_T61 = "VOLKSWAGEN TRANSPORTER T6.1" # Chassis 7H/7L, T6-facelift Transporter/Multivan/Caravelle/California + TROC_MK1 = "VOLKSWAGEN T-ROC 1ST GEN" # Chassis A1, Mk1 VW VW T-Roc and variants AUDI_A3_MK3 = "AUDI A3 3RD GEN" # Chassis 8V/FF, Mk3 Audi A3 and variants AUDI_Q2_MK1 = "AUDI Q2 1ST GEN" # Chassis GA, Mk1 Audi Q2 (RoW) and Q2L (China only) SEAT_ATECA_MK1 = "SEAT ATECA 1ST GEN" # Chassis 5F, Mk1 SEAT Ateca and CUPRA Ateca @@ -467,6 +468,23 @@ class CAR: b'\xf1\x872Q0907572R \xf1\x890372', ], }, + CAR.TROC_MK1: { + (Ecu.engine, 0x7e0, None): [ + b'\xf1\x8705E906018AT\xf1\x899640', + ], + (Ecu.transmission, 0x7e1, None): [ + b'\xf1\x870CW300051M \xf1\x891925', + ], + (Ecu.srs, 0x715, None): [ + b'\xf1\x875Q0959655CG\xf1\x890421\xf1\x82\x13111100123333003142404M1152119333613100', + ], + (Ecu.eps, 0x712, None): [ + b'\xf1\x875Q0909144AB\xf1\x891082\xf1\x82\x0521060405A1', + ], + (Ecu.fwdRadar, 0x757, None): [ + b'\xf1\x872Q0907572T \xf1\x890383', + ], + }, CAR.AUDI_A3_MK3: { (Ecu.engine, 0x7e0, None): [ b'\xf1\x8704E906023AN\xf1\x893695', diff --git a/selfdrive/test/test_routes.py b/selfdrive/test/test_routes.py index 4c4ad9c2fb9d63..7465c8c6fd6c36 100755 --- a/selfdrive/test/test_routes.py +++ b/selfdrive/test/test_routes.py @@ -150,6 +150,7 @@ TestRoute("2cef8a0b898f331a|2021-03-25--20-13-57", VOLKSWAGEN.TIGUAN_MK2), TestRoute("a589dcc642fdb10a|2021-06-14--20-54-26", VOLKSWAGEN.TOURAN_MK2), TestRoute("a459f4556782eba1|2021-09-19--09-48-00", VOLKSWAGEN.TRANSPORTER_T61), + TestRoute("0cd0b7f7e31a3853|2021-11-18--00-38-32", VOLKSWAGEN.TROC_MK1), TestRoute("07667b885add75fd|2021-01-23--19-48-42", VOLKSWAGEN.AUDI_A3_MK3), TestRoute("6c6b466346192818|2021-06-06--14-17-47", VOLKSWAGEN.AUDI_Q2_MK1), TestRoute("8f205bdd11bcbb65|2021-03-26--01-00-17", VOLKSWAGEN.SEAT_ATECA_MK1),