offroad alert for missing nvme (#20931)
* offroad alert for missing nvme * remove that Co-authored-by: Comma Device <device@comma.ai>albatross
parent
b749ba4fe2
commit
313741062e
|
@ -214,6 +214,7 @@ std::unordered_map<std::string, uint32_t> 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},
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue