fix reboot button in offroad alerts

old-commit-hash: 4097fe150a882856fcddbcfa43640342ef5fdd6b
This commit is contained in:
Adeeb Shihadeh
2021-03-15 20:14:19 -07:00
parent aba57850e9
commit 77bc36dc52
+2 -4
View File
@@ -8,7 +8,7 @@
#include "offroad_alerts.hpp"
#include "common/params.h"
#include "selfdrive/hardware/hw.h"
void cleanStackedWidget(QStackedWidget* swidget) {
while(swidget->count() > 0) {
@@ -39,9 +39,7 @@ OffroadAlert::OffroadAlert(QWidget* parent) : QFrame(parent) {
footer_layout->addWidget(reboot_btn, 0, Qt::AlignRight);
QObject::connect(dismiss_btn, SIGNAL(released()), this, SIGNAL(closeAlerts()));
#ifdef __aarch64__
QObject::connect(reboot_btn, &QPushButton::released, [=]() {std::system("sudo reboot");});
#endif
QObject::connect(reboot_btn, &QPushButton::released, [=]() { Hardware::reboot(); });
setLayout(main_layout);
setStyleSheet(R"(