diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp index dd18f176b..c74931300 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp @@ -98,17 +98,17 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp { switch (selectedType) { case VehicleConfigurationSource::INPUT_PWM: - return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PWM; + return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM; case VehicleConfigurationSource::INPUT_PPM: - return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PPM; + return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM; case VehicleConfigurationSource::INPUT_SBUS: - return data.RM_MainPort != HwSettings::CC_MAINPORT_SBUS; + return data.RM_MainPort != HwSettings::RM_MAINPORT_SBUS; case VehicleConfigurationSource::INPUT_DSM: // TODO: Handle all of the DSM types ?? Which is most common? - return data.RM_MainPort != HwSettings::CC_MAINPORT_DSM; + return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM; default: return true; } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index aace4fae1..a8421b294 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -497,11 +497,18 @@ 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(); Q_ASSERT(uploader); uploader->reboot(); + + wiz->setRestartNeeded(false); + wiz->setWindowFlags(wiz->windowFlags() | Qt::WindowStaysOnTopHint); + wiz->show(); } bool SetupWizard::saveHardwareSettings() const diff --git a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp index 6d9506b52..64134ebdb 100644 --- a/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/rebootdialog.cpp @@ -32,6 +32,8 @@ RebootDialog::RebootDialog(UploaderGadgetWidget *uploader) : QDialog(uploader), ui(new Ui::RebootDialog), m_uploader(uploader) { + setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint) + & ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint)); ui->setupUi(this); connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot())); ui->rebootProgressBar->setVisible(true);