for those who want to live in the moment

old-commit-hash: e6d8a845782e1b902b2966edb3c39c882e735b97
This commit is contained in:
Adeeb Shihadeh
2022-01-31 14:24:14 -08:00
parent 055b8b06e6
commit c491f3fc2c
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
"severity": 1
},
"Offroad_StorageMissing": {
"text": "Storage drive not mounted.",
"text": "NVMe drive not mounted.",
"severity": 1
},
"Offroad_CarUnrecognized": {
+2 -1
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())
-3
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