old-commit-hash: 95da470795
taco v0.8.13
Adeeb Shihadeh 3 years ago
parent b695ffbfdb
commit 6ca0269f47
  1. 4
      selfdrive/ui/qt/offroad/settings.cc

@ -199,7 +199,7 @@ void DevicePanel::reboot() {
if (!uiState()->engaged()) { if (!uiState()->engaged()) {
if (ConfirmationDialog::confirm("Are you sure you want to reboot?", this)) { if (ConfirmationDialog::confirm("Are you sure you want to reboot?", this)) {
// Check engaged again in case it changed while the dialog was open // 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); Params().putBool("DoReboot", true);
} }
} }
@ -212,7 +212,7 @@ void DevicePanel::poweroff() {
if (!uiState()->engaged()) { if (!uiState()->engaged()) {
if (ConfirmationDialog::confirm("Are you sure you want to power off?", this)) { if (ConfirmationDialog::confirm("Are you sure you want to power off?", this)) {
// Check engaged again in case it changed while the dialog was open // 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); Params().putBool("DoShutdown", true);
} }
} }

Loading…
Cancel
Save