From 77bc36dc52108492f5d974d2e4e5d377fd596eea Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 15 Mar 2021 20:14:19 -0700 Subject: [PATCH] fix reboot button in offroad alerts old-commit-hash: 4097fe150a882856fcddbcfa43640342ef5fdd6b --- selfdrive/ui/qt/widgets/offroad_alerts.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/qt/widgets/offroad_alerts.cc b/selfdrive/ui/qt/widgets/offroad_alerts.cc index cab47d4633..26a2f7e5a9 100644 --- a/selfdrive/ui/qt/widgets/offroad_alerts.cc +++ b/selfdrive/ui/qt/widgets/offroad_alerts.cc @@ -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"(