wip
This commit is contained in:
@@ -31,11 +31,31 @@ int main(int argc, char *argv[]) {
|
||||
scroll->verticalScrollBar()->setValue(scroll->verticalScrollBar()->maximum());
|
||||
});
|
||||
|
||||
|
||||
QPushButton *btnupdate = new QPushButton();
|
||||
#ifdef __aarch64__
|
||||
btnupdate->setText(QObject::tr("Reboot"));
|
||||
QObject::connect(btnupdate, &QPushButton::clicked, [=]() {
|
||||
QProcess process;
|
||||
// BBOTCRASH
|
||||
// Todo git revert here, show that is what we are doing on the textbox
|
||||
// Also, must hide both buttons when this is clicked to prevent double clicks
|
||||
process.setWorkingDirectory("/data/openpilot/");
|
||||
process.start("/bin/sh", QStringList{"-c", "echo hello world"});
|
||||
process.waitForFinished();
|
||||
Hardware::reboot();
|
||||
});
|
||||
#else
|
||||
btnupdate->setText(QObject::tr("Exit"));
|
||||
QObject::connect(btnupdate, &QPushButton::clicked, &a, &QApplication::quit);
|
||||
#endif
|
||||
main_layout->addWidget(btnupdate, 0, 0, Qt::AlignLeft | Qt::AlignBottom);
|
||||
|
||||
QPushButton *btn = new QPushButton();
|
||||
#ifdef __aarch64__
|
||||
btn->setText(QObject::tr("Reboot"));
|
||||
QObject::connect(btn, &QPushButton::clicked, [=]() {
|
||||
Hardware::reboot();
|
||||
Hardware::reboot(); // bbot this is the dreaded crash reboot button
|
||||
});
|
||||
#else
|
||||
btn->setText(QObject::tr("Exit"));
|
||||
|
||||
Reference in New Issue
Block a user