diff --git a/ground/openpilotgcs/src/plugins/uploader/uploader.ui b/ground/openpilotgcs/src/plugins/uploader/uploader.ui index 253d579b3..1143f5e1f 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploader.ui +++ b/ground/openpilotgcs/src/plugins/uploader/uploader.ui @@ -6,7 +6,7 @@ 0 0 - 822 + 812 523 @@ -27,7 +27,7 @@ 0 0 - 804 + 794 505 @@ -51,55 +51,20 @@ 0 - - - - - false - - - Start a guided procedure to manually -recover a system which does not boot. - -Rescue is possible in USB mode only. - - - Auto Update - - - - - - - false - - - Tells the mainboard to go down -to bootloader mode. -(Only enabled if telemetry link is established, either -through serial or USB) - - - Halt - - - - - - - false - - - Reset the system. -(Only enabled if telemetry link is established, either -through serial or USB) - - - Reset - - - - + + + 0 + + + 0 + + + 0 + + + 6 + + true @@ -117,7 +82,33 @@ menu on the right. - + + + + true + + + <html><head/><body><p>Reboot the board and clear its settings memory.</p><p> Useful if the board cannot boot properly.</p><p> Blue led starts blinking quick for 20-30 seconds than the board will start normally</p><p><br/></p><p>If telemetry is not running, select the link using the dropdown</p><p>menu on the right.</p><p>PLEASE NOTE: Supported with bootloader versions 4.0 and earlier</p></body></html> + + + Erase settings + + + + + + + Start a guided procedure to manually +recover a system which does not boot. + +Rescue is possible in USB mode only. + + + Rescue + + + + true @@ -135,53 +126,8 @@ menu on the right. - - - - Start a guided procedure to manually -recover a system which does not boot. - -Rescue is possible in USB mode only. - - - Rescue - - - - - - - true - - - <html><head/><body><p>Reboot the board and clear its settings memory.</p><p> Useful if the board cannot boot properly.</p><p> Blue led starts blinking quick for 20-30 seconds than the board will start normally</p><p><br/></p><p>If telemetry is not running, select the link using the dropdown</p><p>menu on the right.</p><p>PLEASE NOTE: Supported with bootloader versions 4.0 and earlier</p></body></html> - - - Erase settings - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - - 0 - 0 - - When telemetry is not connected, select the communication method using this combo box. @@ -192,8 +138,14 @@ halting a running board. - + + + + 0 + 23 + + Refresh the list of serial ports @@ -202,7 +154,43 @@ halting a running board. - + + + + false + + + Tells the mainboard to go down +to bootloader mode. +(Only enabled if telemetry link is established, either +through serial or USB) + + + Halt + + + + + + + + + + + :/core/images/helpicon.svg:/core/images/helpicon.svg + + + + 18 + 18 + + + + true + + + + @@ -215,26 +203,56 @@ halting a running board. - - + + + + false + + + Reset the system. +(Only enabled if telemetry link is established, either +through serial or USB) + - - - - - :/core/images/helpicon.svg:/core/images/helpicon.svg - - - - 30 - 30 - - - - true + Reset + + + + false + + + + 75 + 0 + + + + Start a guided procedure to manually +recover a system which does not boot. + +Rescue is possible in USB mode only. + + + Auto Update + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 5fa1049ee..f90ad751c 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -32,6 +32,8 @@ #define DFU_DEBUG true +const int UploaderGadgetWidget::AUTOUPDATE_CLOSE_TIMEOUT = 7000; + UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent) { m_config = new Ui_UploaderWidget(); @@ -358,16 +360,10 @@ void UploaderGadgetWidget::goToBootloader(UAVObject *callerObj, bool success) dw->populate(); m_config->systemElements->addTab(dw, QString("Device") + QString::number(i)); } - /* - m_config->haltButton->setEnabled(false); - m_config->resetButton->setEnabled(false); - */ + // Need to re-enable in case we were not connected bootButtonsSetEnable(true); - /* - m_config->telemetryLink->setEnabled(false); - m_config->rescueButton->setEnabled(false); - */ + if (resetOnly) { resetOnly = false; delay::msleep(3500); @@ -835,10 +831,14 @@ void UploaderGadgetWidget::finishAutoUpdate() { disconnect(this, SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep, QVariant)), this, SLOT(autoUpdateStatus(uploader::AutoUpdateStep, QVariant))); m_config->autoUpdateOkButton->setEnabled(true); + connect(&autoUpdateCloseTimer, SIGNAL(timeout()), this, SLOT(closeAutoUpdate())); + autoUpdateCloseTimer.start(AUTOUPDATE_CLOSE_TIMEOUT); } void UploaderGadgetWidget::closeAutoUpdate() { + autoUpdateCloseTimer.stop(); + disconnect(&autoUpdateCloseTimer, SIGNAL(timeout()), this, SLOT(closeAutoUpdate())); m_config->autoUpdateGroupBox->setVisible(false); m_config->buttonFrame->setEnabled(true); m_config->splitter->setEnabled(true); diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h index 461b82daa..cf7f39586 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h @@ -97,6 +97,8 @@ private: int autoUpdateConnectTimeout; FlightStatus *getFlightStatus(); void bootButtonsSetEnable(bool enabled); + static const int AUTOUPDATE_CLOSE_TIMEOUT; + QTimer autoUpdateCloseTimer; private slots: void onPhisicalHWConnect(); void versionMatchCheck();