Files
sunnypilot/selfdrive/ui/qt/setup/reset.h
Andrei Radulescu 754882c985 reset: auto-format is back (#34479)
* Revert "update factory reset"

This reverts commit 533206be2f.

* keep reset message

* Update selfdrive/ui/qt/setup/reset.h

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-25 12:29:48 -08:00

28 lines
616 B
C++

#include <QLabel>
#include <QPushButton>
#include <QWidget>
enum ResetMode {
USER_RESET, // user initiated a factory reset from openpilot
RECOVER, // userdata is corrupt for some reason, give a chance to recover
FORMAT, // finish up a factory reset from a tool that doesn't flash an empty partition to userdata
};
class Reset : public QWidget {
Q_OBJECT
public:
explicit Reset(ResetMode mode, QWidget *parent = 0);
private:
QLabel *body;
QPushButton *rejectBtn;
QPushButton *rebootBtn;
QPushButton *confirmBtn;
void doErase();
void startReset();
private slots:
void confirm();
};