1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Fixed so that the actuator state error message box does not open behind the wizard. Changed the text to be more informative.

This commit is contained in:
Fredrik Arvidsson 2012-10-16 00:37:15 +02:00
parent 5c141d458d
commit dd7b69dbbc

View File

@ -300,16 +300,21 @@ bool OutputCalibrationPage::checkAlarms()
SystemAlarms::DataFields data = systemAlarms->getData(); SystemAlarms::DataFields data = systemAlarms->getData();
if(data.Alarm[SystemAlarms::ALARM_ACTUATOR] != SystemAlarms::ALARM_OK) { 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" 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" "Please make sure the correct firmware version is used then "
"if the board is not sufficiently powered by an external power source like\n" "restart the wizard and try again. If the problem persists please "
"a battery. To use only USB as power source is not enough when the USB can't\n" "consult the openpilot.org support forum.")));
"power external components like ESCs and servos.\n\n"
"Please fix the error before continuing calibration.")));
mbox.setStandardButtons(QMessageBox::Ok); mbox.setStandardButtons(QMessageBox::Ok);
mbox.setIcon(QMessageBox::Critical); mbox.setIcon(QMessageBox::Critical);
getWizard()->setWindowFlags(getWizard()->windowFlags() & ~Qt::WindowStaysOnTopHint);
mbox.exec(); mbox.exec();
getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint);
getWizard()->setWindowIcon(qApp->windowIcon());
getWizard()->show();
return false; return false;
} }
return true; return true;