From ee0bb61cc788decec6e4ac00a203ce12951e6293 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 31 Aug 2023 21:50:45 -0700 Subject: [PATCH] Toyota: fix missing message check with radar disabled (#29747) * add test route for radar-disabled toyota chr hybrid tss 2 * fix bug old-commit-hash: a18e97e954f4cafec46f186df635a91576479cc1 --- selfdrive/car/tests/routes.py | 1 + selfdrive/car/toyota/carstate.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/tests/routes.py b/selfdrive/car/tests/routes.py index b5fe615200..aaf5b48915 100644 --- a/selfdrive/car/tests/routes.py +++ b/selfdrive/car/tests/routes.py @@ -206,6 +206,7 @@ routes = [ CarTestRoute("ea8fbe72b96a185c|2023-02-22--09-20-34", TOYOTA.CHR_TSS2), # openpilot longitudinal, with smartDSU CarTestRoute("57858ede0369a261|2021-05-18--20-34-20", TOYOTA.CHRH), CarTestRoute("6719965b0e1d1737|2023-02-09--22-44-05", TOYOTA.CHRH_TSS2), + # CarTestRoute("6719965b0e1d1737|2023-08-29--06-40-05", TOYOTA.CHRH_TSS2), # openpilot longitudinal, radar disabled CarTestRoute("14623aae37e549f3|2021-10-24--01-20-49", TOYOTA.PRIUS_V), CarTestRoute("202c40641158a6e5|2021-09-21--09-43-24", VOLKSWAGEN.ARTEON_MK1), diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index c96df6f10f..076668fffb 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -210,7 +210,7 @@ class CarState(CarStateBase): ("PCS_HUD", 1), ] - if CP.carFingerprint not in (TSS2_CAR - RADAR_ACC_CAR) and not CP.enableDsu: + if CP.carFingerprint not in (TSS2_CAR - RADAR_ACC_CAR) and not CP.enableDsu and not CP.flags & ToyotaFlags.DISABLE_RADAR.value: messages += [ ("PRE_COLLISION", 33), ]