diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index fc5fd38061..bf04403a0c 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -214,6 +214,7 @@ std::unordered_map keys = { {"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START}, {"Offroad_HardwareUnsupported", CLEAR_ON_MANAGER_START}, {"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START}, + {"Offroad_NvmeMissing", CLEAR_ON_MANAGER_START}, {"ForcePowerDown", CLEAR_ON_MANAGER_START}, }; diff --git a/selfdrive/controls/lib/alerts_offroad.json b/selfdrive/controls/lib/alerts_offroad.json index f8aaab74e8..09847a4efd 100644 --- a/selfdrive/controls/lib/alerts_offroad.json +++ b/selfdrive/controls/lib/alerts_offroad.json @@ -44,5 +44,9 @@ "Offroad_UnofficialHardware": { "text": "Device failed to register. It will not connect to or upload to comma.ai servers, and receives no support from comma.ai. If this is an official device, contact support@comma.ai.", "severity": 1 + }, + "Offroad_NvmeMissing": { + "text": "NVME drive not mounted.", + "severity": 1 } } diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 7d409aed7c..1d807c9ab2 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -350,6 +350,11 @@ def thermald_thread(): startup_conditions["device_temp_good"] = thermal_status < ThermalStatus.danger set_offroad_alert_if_changed("Offroad_TemperatureTooHigh", (not startup_conditions["device_temp_good"])) + if TICI: + nvme_path = Path("/data/media") + startup_conditions["nvme_mounted"] = nvme_path.is_mount() + set_offroad_alert_if_changed("Offroad_NvmeMissing", (not startup_conditions["nvme_mounted"])) + # Handle offroad/onroad transition should_start = all(startup_conditions.values()) if should_start != should_start_prev or (count == 0):