for those who want to live in the moment

old-commit-hash: e6d8a84578
commatwo_master
Adeeb Shihadeh 3 years ago
parent 055b8b06e6
commit c491f3fc2c
  1. 2
      selfdrive/controls/lib/alerts_offroad.json
  2. 3
      selfdrive/thermald/thermald.py
  3. 3
      selfdrive/ui/qt/setup/reset.cc

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

@ -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())

@ -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

Loading…
Cancel
Save