diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index a8421b294..4fdfd2850 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -498,11 +498,12 @@ void SetupWizard::pageChanged(int currId) void SetupWizard::reboot() const { SetupWizard *wiz = const_cast(this); + wiz->setWindowFlags(wiz->windowFlags() & ~Qt::WindowStaysOnTopHint); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Q_ASSERT(pm); - UploaderGadgetFactory *uploader = pm->getObject(); + UploaderGadgetFactory *uploader = pm->getObject(); Q_ASSERT(uploader); uploader->reboot(); diff --git a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp index 64134ebdb..0e1d74c39 100644 --- a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp @@ -33,7 +33,7 @@ RebootDialog::RebootDialog(UploaderGadgetWidget *uploader) : ui(new Ui::RebootDialog), m_uploader(uploader) { setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint) - & ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint)); + & ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint)); ui->setupUi(this); connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot())); ui->rebootProgressBar->setVisible(true); @@ -67,9 +67,9 @@ void RebootDialog::progressUpdate(uploader::ProgressStep progress, QVariant mess ui->rebootProgressBar->setVisible(false); ui->okButton->setVisible(true); ui->label->setText(tr("Reboot failed!

Please perform a manual reboot by power cycling the board.
" - "To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.
" - "After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.
" - "Then press Ok.")); + "To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.
" + "After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.
" + "Then press Ok.")); QDialog::exec(); } else { accept(); diff --git a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.h b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.h index 15fd4ecf2..743d571a7 100644 --- a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.h +++ b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.h @@ -35,8 +35,7 @@ namespace Ui { class RebootDialog; } -class RebootDialog : public QDialog -{ +class RebootDialog : public QDialog { Q_OBJECT public: diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 0504b8e2e..ac416a8c6 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -552,6 +552,7 @@ void UploaderGadgetWidget::systemEraseBoot() void UploaderGadgetWidget::rebootWithDialog() { RebootDialog dialog(this); + dialog.exec(); } @@ -1014,6 +1015,7 @@ void UploaderGadgetWidget::autoUpdateStatus(uploader::ProgressStep status, QVari { QString msg; int remaining; + switch (status) { case uploader::WAITING_DISCONNECT: m_config->autoUpdateLabel->setText(tr("Waiting for all OpenPilot boards to be disconnected from USB."));