From dd7b69dbbc6171f67564b124a4f211c45a511fae Mon Sep 17 00:00:00 2001 From: Fredrik Arvidsson Date: Tue, 16 Oct 2012 00:37:15 +0200 Subject: [PATCH] Fixed so that the actuator state error message box does not open behind the wizard. Changed the text to be more informative. --- .../setupwizard/pages/outputcalibrationpage.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp index 56ae80960..642d2a3ba 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/outputcalibrationpage.cpp @@ -300,16 +300,21 @@ bool OutputCalibrationPage::checkAlarms() SystemAlarms::DataFields data = systemAlarms->getData(); if(data.Alarm[SystemAlarms::ALARM_ACTUATOR] != SystemAlarms::ALARM_OK) { - QMessageBox mbox; + QMessageBox mbox(this); mbox.setText(QString(tr("The actuator module is in an error state.\n\n" - "This error can be caused by not having the board correctly connected or\n" - "if the board is not sufficiently powered by an external power source like\n" - "a battery. To use only USB as power source is not enough when the USB can't\n" - "power external components like ESCs and servos.\n\n" - "Please fix the error before continuing calibration."))); + "Please make sure the correct firmware version is used then " + "restart the wizard and try again. If the problem persists please " + "consult the openpilot.org support forum."))); mbox.setStandardButtons(QMessageBox::Ok); mbox.setIcon(QMessageBox::Critical); + + getWizard()->setWindowFlags(getWizard()->windowFlags() & ~Qt::WindowStaysOnTopHint); + mbox.exec(); + + getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint); + getWizard()->setWindowIcon(qApp->windowIcon()); + getWizard()->show(); return false; } return true;