From 62402f9b021cdf16a27fd9fb0883d81169711cbd Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 1 Mar 2024 02:02:14 -0800 Subject: [PATCH] test sets --- selfdrive/car/toyota/values.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index e984a0061f4ec6..0df1bb55f81b36 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -608,3 +608,30 @@ def match_fw_to_car_fuzzy(live_fw_versions, offline_fw_versions) -> set[str]: CAR_INFO = CAR.create_carinfo_map() DBC = CAR.create_dbc_map() + +# OLD +TSS2_CAR_OLD = {CAR.RAV4_TSS2, CAR.RAV4_TSS2_2022, CAR.RAV4_TSS2_2023, CAR.COROLLA_TSS2, CAR.LEXUS_ES_TSS2, + CAR.LEXUS_RX_TSS2, CAR.HIGHLANDER_TSS2, CAR.PRIUS_TSS2, CAR.CAMRY_TSS2, CAR.LEXUS_IS_TSS2, + CAR.MIRAI, CAR.LEXUS_NX_TSS2, CAR.LEXUS_LC_TSS2, CAR.ALPHARD_TSS2, CAR.AVALON_TSS2, + CAR.CHR_TSS2} + +NO_DSU_CAR_OLD = TSS2_CAR | {CAR.CHR, CAR.CAMRY} + +# the DSU uses the AEB message for longitudinal on these cars +UNSUPPORTED_DSU_CAR_OLD = {CAR.LEXUS_IS, CAR.LEXUS_RC, CAR.LEXUS_GS_F} + +# these cars have a radar which sends ACC messages instead of the camera +RADAR_ACC_CAR_OLD = {CAR.RAV4_TSS2_2022, CAR.RAV4_TSS2_2023, CAR.CHR_TSS2} + +# these cars use the Lane Tracing Assist (LTA) message for lateral control +ANGLE_CONTROL_CAR_OLD = {CAR.RAV4_TSS2_2023} + +# no resume button press required +NO_STOP_TIMER_CAR_OLD = TSS2_CAR | {CAR.PRIUS_V, CAR.RAV4H, CAR.HIGHLANDER, CAR.SIENNA} + +assert TSS2_CAR == TSS2_CAR_OLD +assert NO_DSU_CAR == NO_DSU_CAR_OLD +assert UNSUPPORTED_DSU_CAR == UNSUPPORTED_DSU_CAR_OLD +assert RADAR_ACC_CAR == RADAR_ACC_CAR_OLD +assert ANGLE_CONTROL_CAR == ANGLE_CONTROL_CAR_OLD +assert NO_STOP_TIMER_CAR == NO_STOP_TIMER_CAR_OLD