From 95da47079510afc91665263619e5939126da637c Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 15 Feb 2022 16:44:13 -0800 Subject: [PATCH] same check --- selfdrive/ui/qt/offroad/settings.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 051eaedfa5..f3584460d6 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -199,7 +199,7 @@ void DevicePanel::reboot() { if (!uiState()->engaged()) { if (ConfirmationDialog::confirm("Are you sure you want to reboot?", this)) { // Check engaged again in case it changed while the dialog was open - if (uiState()->status == UIStatus::STATUS_DISENGAGED) { + if (!uiState()->engaged()) { Params().putBool("DoReboot", true); } } @@ -212,7 +212,7 @@ void DevicePanel::poweroff() { if (!uiState()->engaged()) { if (ConfirmationDialog::confirm("Are you sure you want to power off?", this)) { // Check engaged again in case it changed while the dialog was open - if (uiState()->status == UIStatus::STATUS_DISENGAGED) { + if (!uiState()->engaged()) { Params().putBool("DoShutdown", true); } }