From d609b70296f766ac15a4a627a7fe8631651134cc Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 30 May 2023 20:46:44 -0700 Subject: [PATCH] cars: log non-critical car faults (#28338) * log non-noEntry acc faults non * adasFaulted * bump * bump again * bump agaiiinn * remove event * bump to master * add fixme comment and fix * whoops * switch old-commit-hash: 2ff1eadb1153a26a177a55f1f29426ebf328b655 --- cereal | 2 +- selfdrive/car/honda/carstate.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cereal b/cereal index 9b6b53396f..3f950792d8 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 9b6b53396fff6ec7541a5415901d892e57756b91 +Subproject commit 3f950792d896b9c6e1846e522757abb3eae3087d diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 57a2f4a846..35d6279902 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -195,8 +195,16 @@ class CarState(CarStateBase): if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS: ret.accFaulted = bool(cp.vl["CRUISE_FAULT_STATUS"]["CRUISE_FAULT"]) - elif self.CP.openpilotLongitudinalControl: - ret.accFaulted = bool(cp.vl["STANDSTILL"]["BRAKE_ERROR_1"] or cp.vl["STANDSTILL"]["BRAKE_ERROR_2"]) + else: + # On some cars, these two signals are always 1, this flag is masking a bug in release + # FIXME: find and set the ACC faulted signals on more platforms + if self.CP.openpilotLongitudinalControl: + ret.accFaulted = bool(cp.vl["STANDSTILL"]["BRAKE_ERROR_1"] or cp.vl["STANDSTILL"]["BRAKE_ERROR_2"]) + + # Log non-critical stock ACC/LKAS faults if Nidec (camera) + if self.CP.carFingerprint not in HONDA_BOSCH: + ret.carFaultedNonCritical = bool(cp_cam.vl["ACC_HUD"]["ACC_PROBLEM"] or cp_cam.vl["LKAS_HUD"]["LKAS_PROBLEM"]) + ret.espDisabled = cp.vl["VSA_STATUS"]["ESP_DISABLED"] != 0 ret.wheelSpeeds = self.get_wheel_speeds( @@ -331,12 +339,15 @@ class CarState(CarStateBase): ("AEB_REQ_1", "BRAKE_COMMAND"), ("FCW", "BRAKE_COMMAND"), ("CHIME", "BRAKE_COMMAND"), + ("LKAS_PROBLEM", "LKAS_HUD"), ("FCM_OFF", "ACC_HUD"), ("FCM_OFF_2", "ACC_HUD"), ("FCM_PROBLEM", "ACC_HUD"), + ("ACC_PROBLEM", "ACC_HUD"), ("ICONS", "ACC_HUD")] checks += [ ("ACC_HUD", 10), + ("LKAS_HUD", 10), ("BRAKE_COMMAND", 50), ]