Skip to content

Commit

Permalink
same check
Browse files Browse the repository at this point in the history
old-commit-hash: 95da470
  • Loading branch information
adeebshihadeh committed Feb 16, 2022
1 parent b695ffb commit 6ca0269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/ui/qt/offroad/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 6ca0269

Please sign in to comment.