update factory reset

old-commit-hash: 80ea4db7bb
chrysler-long2
Adeeb Shihadeh 1 year ago
parent 01eccef5de
commit 533206be2f
  1. 9
      selfdrive/ui/qt/setup/reset.cc
  2. 1
      selfdrive/ui/qt/setup/reset.h

@ -57,7 +57,7 @@ Reset::Reset(ResetMode mode, QWidget *parent) : QWidget(parent) {
main_layout->addSpacing(60); main_layout->addSpacing(60);
body = new QLabel(tr("Press confirm to erase all content and settings. Press cancel to resume boot.")); body = new QLabel(tr("System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot."));
body->setWordWrap(true); body->setWordWrap(true);
body->setStyleSheet("font-size: 80px; font-weight: light;"); body->setStyleSheet("font-size: 80px; font-weight: light;");
main_layout->addWidget(body, 1, Qt::AlignTop | Qt::AlignLeft); main_layout->addWidget(body, 1, Qt::AlignTop | Qt::AlignLeft);
@ -97,11 +97,6 @@ Reset::Reset(ResetMode mode, QWidget *parent) : QWidget(parent) {
body->setText(tr("Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device.")); body->setText(tr("Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device."));
} }
// automatically start if we're just finishing up an ABL reset
if (mode == ResetMode::FORMAT) {
startReset();
}
setStyleSheet(R"( setStyleSheet(R"(
* { * {
font-family: Inter; font-family: Inter;
@ -129,8 +124,6 @@ int main(int argc, char *argv[]) {
if (argc > 1) { if (argc > 1) {
if (strcmp(argv[1], "--recover") == 0) { if (strcmp(argv[1], "--recover") == 0) {
mode = ResetMode::RECOVER; mode = ResetMode::RECOVER;
} else if (strcmp(argv[1], "--format") == 0) {
mode = ResetMode::FORMAT;
} }
} }

@ -5,7 +5,6 @@
enum ResetMode { enum ResetMode {
USER_RESET, // user initiated a factory reset from openpilot USER_RESET, // user initiated a factory reset from openpilot
RECOVER, // userdata is corrupt for some reason, give a chance to recover RECOVER, // userdata is corrupt for some reason, give a chance to recover
FORMAT, // finish up an ABL factory reset
}; };
class Reset : public QWidget { class Reset : public QWidget {

Loading…
Cancel
Save