for those who want to live in the moment

pull/23676/head
Adeeb Shihadeh 2022-01-31 14:24:14 -08:00
parent 1c31c9b7a3
commit e6d8a84578
3 changed files with 3 additions and 5 deletions

View File

@ -38,7 +38,7 @@
"severity": 1
},
"Offroad_StorageMissing": {
"text": "Storage drive not mounted.",
"text": "NVMe drive not mounted.",
"severity": 1
},
"Offroad_CarUnrecognized": {

View File

@ -342,7 +342,8 @@ def thermald_thread(end_event, hw_queue):
set_offroad_alert_if_changed("Offroad_TemperatureTooHigh", (not onroad_conditions["device_temp_good"]))
if TICI:
set_offroad_alert_if_changed("Offroad_StorageMissing", (not Path("/data/media").is_mount()))
missing = (not Path("/data/media").is_mount()) and (not os.path.isfile("/persist/comma/living-in-the-moment"))
set_offroad_alert_if_changed("Offroad_StorageMissing", missing)
# Handle offroad/onroad transition
should_start = all(onroad_conditions.values())

View File

@ -9,15 +9,12 @@
#include "selfdrive/ui/qt/setup/reset.h"
#define NVME "/dev/nvme0n1"
#define SDCARD "/dev/mmcblk0"
#define USERDATA "/dev/disk/by-partlabel/userdata"
void Reset::doReset() {
// best effort to wipe nvme and sd card
std::system("sudo umount " NVME);
std::system("yes | sudo mkfs.ext4 " NVME);
std::system("sudo umount " SDCARD);
std::system("yes | sudo mkfs.ext4 " SDCARD);
// we handle two cases here
// * user-prompted factory reset