mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Merge branch 'thread/OP-1024_Uploader_GUI_Fixes' into rel-13.06.01
This commit is contained in:
commit
076b4bbf6e
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>822</width>
|
<width>812</width>
|
||||||
<height>523</height>
|
<height>523</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>804</width>
|
<width>794</width>
|
||||||
<height>505</height>
|
<height>505</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -51,55 +51,20 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item>
|
<property name="leftMargin">
|
||||||
<widget class="QPushButton" name="autoUpdateButton">
|
<number>0</number>
|
||||||
<property name="enabled">
|
</property>
|
||||||
<bool>false</bool>
|
<property name="topMargin">
|
||||||
</property>
|
<number>0</number>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Start a guided procedure to manually
|
<property name="rightMargin">
|
||||||
recover a system which does not boot.
|
<number>0</number>
|
||||||
|
</property>
|
||||||
Rescue is possible in USB mode only.</string>
|
<property name="horizontalSpacing">
|
||||||
</property>
|
<number>6</number>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Auto Update</string>
|
<item row="0" column="3" colspan="2">
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="haltButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Tells the mainboard to go down
|
|
||||||
to bootloader mode.
|
|
||||||
(Only enabled if telemetry link is established, either
|
|
||||||
through serial or USB)</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Halt</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="resetButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reset the system.
|
|
||||||
(Only enabled if telemetry link is established, either
|
|
||||||
through serial or USB)</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Reset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="bootButton">
|
<widget class="QPushButton" name="bootButton">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -117,7 +82,33 @@ menu on the right.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="5" colspan="3">
|
||||||
|
<widget class="QPushButton" name="eraseBootButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><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></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Erase settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5" colspan="3">
|
||||||
|
<widget class="QPushButton" name="rescueButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Start a guided procedure to manually
|
||||||
|
recover a system which does not boot.
|
||||||
|
|
||||||
|
Rescue is possible in USB mode only.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rescue</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" colspan="2">
|
||||||
<widget class="QPushButton" name="safeBootButton">
|
<widget class="QPushButton" name="safeBootButton">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -135,53 +126,8 @@ menu on the right.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="9">
|
||||||
<widget class="QPushButton" name="rescueButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Start a guided procedure to manually
|
|
||||||
recover a system which does not boot.
|
|
||||||
|
|
||||||
Rescue is possible in USB mode only.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Rescue</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="eraseBootButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><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></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Erase settings</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="telemetryLink">
|
<widget class="QComboBox" name="telemetryLink">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>When telemetry is not connected, select the communication
|
<string>When telemetry is not connected, select the communication
|
||||||
method using this combo box.
|
method using this combo box.
|
||||||
@ -192,8 +138,14 @@ halting a running board.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="10">
|
||||||
<widget class="QToolButton" name="refreshPorts">
|
<widget class="QToolButton" name="refreshPorts">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Refresh the list of serial ports</string>
|
<string>Refresh the list of serial ports</string>
|
||||||
</property>
|
</property>
|
||||||
@ -202,7 +154,43 @@ halting a running board.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="haltButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Tells the mainboard to go down
|
||||||
|
to bootloader mode.
|
||||||
|
(Only enabled if telemetry link is established, either
|
||||||
|
through serial or USB)</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Halt</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="12">
|
||||||
|
<widget class="QPushButton" name="pbHelp">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../coreplugin/core.qrc">
|
||||||
|
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>18</width>
|
||||||
|
<height>18</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="11">
|
||||||
<widget class="QLabel" name="boardStatus">
|
<widget class="QLabel" name="boardStatus">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -215,26 +203,56 @@ halting a running board.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="2">
|
||||||
<widget class="QPushButton" name="pbHelp">
|
<widget class="QPushButton" name="resetButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Reset the system.
|
||||||
|
(Only enabled if telemetry link is established, either
|
||||||
|
through serial or USB)</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>Reset</string>
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../coreplugin/core.qrc">
|
|
||||||
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>30</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QPushButton" name="autoUpdateButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>75</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Start a guided procedure to manually
|
||||||
|
recover a system which does not boot.
|
||||||
|
|
||||||
|
Rescue is possible in USB mode only.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto Update</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#define DFU_DEBUG true
|
#define DFU_DEBUG true
|
||||||
|
|
||||||
|
const int UploaderGadgetWidget::AUTOUPDATE_CLOSE_TIMEOUT = 7000;
|
||||||
|
|
||||||
UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
|
UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
m_config = new Ui_UploaderWidget();
|
m_config = new Ui_UploaderWidget();
|
||||||
@ -358,16 +360,10 @@ void UploaderGadgetWidget::goToBootloader(UAVObject *callerObj, bool success)
|
|||||||
dw->populate();
|
dw->populate();
|
||||||
m_config->systemElements->addTab(dw, QString("Device") + QString::number(i));
|
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
|
// Need to re-enable in case we were not connected
|
||||||
bootButtonsSetEnable(true);
|
bootButtonsSetEnable(true);
|
||||||
/*
|
|
||||||
m_config->telemetryLink->setEnabled(false);
|
|
||||||
m_config->rescueButton->setEnabled(false);
|
|
||||||
*/
|
|
||||||
if (resetOnly) {
|
if (resetOnly) {
|
||||||
resetOnly = false;
|
resetOnly = false;
|
||||||
delay::msleep(3500);
|
delay::msleep(3500);
|
||||||
@ -835,10 +831,14 @@ void UploaderGadgetWidget::finishAutoUpdate()
|
|||||||
{
|
{
|
||||||
disconnect(this, SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep, QVariant)), this, SLOT(autoUpdateStatus(uploader::AutoUpdateStep, QVariant)));
|
disconnect(this, SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep, QVariant)), this, SLOT(autoUpdateStatus(uploader::AutoUpdateStep, QVariant)));
|
||||||
m_config->autoUpdateOkButton->setEnabled(true);
|
m_config->autoUpdateOkButton->setEnabled(true);
|
||||||
|
connect(&autoUpdateCloseTimer, SIGNAL(timeout()), this, SLOT(closeAutoUpdate()));
|
||||||
|
autoUpdateCloseTimer.start(AUTOUPDATE_CLOSE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploaderGadgetWidget::closeAutoUpdate()
|
void UploaderGadgetWidget::closeAutoUpdate()
|
||||||
{
|
{
|
||||||
|
autoUpdateCloseTimer.stop();
|
||||||
|
disconnect(&autoUpdateCloseTimer, SIGNAL(timeout()), this, SLOT(closeAutoUpdate()));
|
||||||
m_config->autoUpdateGroupBox->setVisible(false);
|
m_config->autoUpdateGroupBox->setVisible(false);
|
||||||
m_config->buttonFrame->setEnabled(true);
|
m_config->buttonFrame->setEnabled(true);
|
||||||
m_config->splitter->setEnabled(true);
|
m_config->splitter->setEnabled(true);
|
||||||
|
@ -97,6 +97,8 @@ private:
|
|||||||
int autoUpdateConnectTimeout;
|
int autoUpdateConnectTimeout;
|
||||||
FlightStatus *getFlightStatus();
|
FlightStatus *getFlightStatus();
|
||||||
void bootButtonsSetEnable(bool enabled);
|
void bootButtonsSetEnable(bool enabled);
|
||||||
|
static const int AUTOUPDATE_CLOSE_TIMEOUT;
|
||||||
|
QTimer autoUpdateCloseTimer;
|
||||||
private slots:
|
private slots:
|
||||||
void onPhisicalHWConnect();
|
void onPhisicalHWConnect();
|
||||||
void versionMatchCheck();
|
void versionMatchCheck();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user