mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
gcs: (uploader plugin) few firmware info string and icon changes
Also it looks like the date check clause doesn't work, needs to be checked.
This commit is contained in:
parent
ba58ec7e08
commit
2f7f920ef3
@ -189,7 +189,7 @@ bool deviceWidget::populateBoardStructuredDescription(QByteArray desc)
|
||||
myDevice->lblDescription->setText(QString("Firmware tag: ")+onBoardDescrition.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/application-certificate.svg"));
|
||||
myDevice->lblCertified->setPixmap(pix);
|
||||
myDevice->lblCertified->setToolTip(tr("Official Firmware Build"));
|
||||
myDevice->lblCertified->setToolTip(tr("Tagged officially released firmware build"));
|
||||
|
||||
}
|
||||
else
|
||||
@ -197,7 +197,7 @@ bool deviceWidget::populateBoardStructuredDescription(QByteArray desc)
|
||||
myDevice->lblDescription->setText(onBoardDescrition.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/warning.svg"));
|
||||
myDevice->lblCertified->setPixmap(pix);
|
||||
myDevice->lblCertified->setToolTip(tr("Custom Firmware Build"));
|
||||
myDevice->lblCertified->setToolTip(tr("Untagged or custom firmware build"));
|
||||
}
|
||||
|
||||
myDevice->lblBrdName->setText(idToBoardName(onBoardDescrition.boardType<<8));
|
||||
@ -220,7 +220,7 @@ bool deviceWidget::populateLoadedStructuredDescription(QByteArray desc)
|
||||
myDevice->description->setText(LoadedDescrition.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/application-certificate.svg"));
|
||||
myDevice->lblCertifiedL->setPixmap(pix);
|
||||
myDevice->lblCertifiedL->setToolTip(tr("Official Firmware Build"));
|
||||
myDevice->lblCertifiedL->setToolTip(tr("Tagged officially released firmware build"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -228,7 +228,7 @@ bool deviceWidget::populateLoadedStructuredDescription(QByteArray desc)
|
||||
myDevice->description->setText(LoadedDescrition.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/warning.svg"));
|
||||
myDevice->lblCertifiedL->setPixmap(pix);
|
||||
myDevice->lblCertifiedL->setToolTip(tr("Custom Firmware Build"));
|
||||
myDevice->lblCertifiedL->setToolTip(tr("Untagged or custom firmware build"));
|
||||
}
|
||||
myDevice->lblBrdNameL->setText(deviceDescriptorStruct::idToBoardName(LoadedDescrition.boardType<<8));
|
||||
|
||||
@ -312,34 +312,34 @@ void deviceWidget::loadFirmware()
|
||||
myDevice->groupCustom->setVisible(false);
|
||||
if(myDevice->lblCRC->text()==myDevice->lblCRCL->text())
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware the same as on the board. You should not upload it"));
|
||||
myDevice->statusLabel->setText(tr("The board has the same firmware as loaded. No need to update"));
|
||||
px.load(QString(":/uploader/images/warning.svg"));
|
||||
}
|
||||
else if(myDevice->lblDevName->text()!=myDevice->lblBrdNameL->text())
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware is not suited for the HW connected. You shouldn't upload it"));
|
||||
px.load(QString(":/uploader/images/warning.svg"));
|
||||
myDevice->statusLabel->setText(tr("WARNING: the loaded firmware is for different hardware. Do not update!"));
|
||||
px.load(QString(":/uploader/images/error.svg"));
|
||||
}
|
||||
else if(QDateTime::fromString(onBoardDescrition.buildDate)>QDateTime::fromString(LoadedDescrition.buildDate))
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware is older than the firmware on the board. You should not upload it"));
|
||||
myDevice->statusLabel->setText(tr("The board has newer firmware than loaded. Are you sure you want to update?"));
|
||||
px.load(QString(":/uploader/images/warning.svg"));
|
||||
}
|
||||
else if(!LoadedDescrition.description.startsWith("release",Qt::CaseInsensitive))
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware is not an oficial OpenPilot release. You should upload it only if you know what you are doing"));
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware is untagged or custom build. Update only if it was received from a trusted source (official website or your own build)"));
|
||||
px.load(QString(":/uploader/images/warning.svg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("Everything seems OK. You should upload the loaded firmware by pressing 'Flash'"));
|
||||
myDevice->statusLabel->setText(tr("This is the tagged officially released OpenPilot firmware"));
|
||||
px.load(QString(":/uploader/images/gtk-info.svg"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
myDevice->statusLabel->setText(tr("The loaded firmware was not packaged with the OpenPilot format. You should not upload it unless you know what you are doing."));
|
||||
px.load(QString(":/uploader/images/warning.svg"));
|
||||
myDevice->statusLabel->setText(tr("WARNING: the loaded firmware was not packaged with the OpenPilot format. Do not update unless you know what you are doing"));
|
||||
px.load(QString(":/uploader/images/error.svg"));
|
||||
myDevice->youdont->setChecked(false);
|
||||
myDevice->youdont->setVisible(true);
|
||||
myDevice->verticalGroupBox_loaded->setVisible(false);
|
||||
@ -514,7 +514,7 @@ QString deviceWidget::setOpenFileName()
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Select firmware file"),
|
||||
"",
|
||||
tr("Firmware Files (*.bin *.opfw)"),
|
||||
tr("Firmware Files (*.opfw *.bin)"),
|
||||
&selectedFilter,
|
||||
options);
|
||||
return fileName;
|
||||
|
@ -93,10 +93,10 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbLoad">
|
||||
<property name="toolTip">
|
||||
<string>Loads the firmware</string>
|
||||
<string>Open a file with new firmware image to be flashed</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Load...</string>
|
||||
<string>Open...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -116,7 +116,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Update the firmware on this board.</string>
|
||||
<string>Write loaded firmware image to the board</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Flash</string>
|
||||
@ -126,7 +126,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="retrieveButton">
|
||||
<property name="toolTip">
|
||||
<string>Download the current board firmware to your computer</string>
|
||||
<string>Read and save current board firmware to a file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Retrieve...</string>
|
||||
@ -228,7 +228,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>GIT Tag:</string>
|
||||
<string>Git tag:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
35
ground/openpilotgcs/src/plugins/uploader/images/error.svg
Normal file
35
ground/openpilotgcs/src/plugins/uploader/images/error.svg
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg id="svg3247" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs id="defs3249">
|
||||
<linearGradient id="linearGradient2411" y2="5.4676" gradientUnits="userSpaceOnUse" x2="63.397" gradientTransform="matrix(2.1154 0 0 2.1153 -107.58 32.427)" y1="-12.489" x1="63.397">
|
||||
<stop id="stop4875" style="stop-color:#fff" offset="0"/>
|
||||
<stop id="stop4877" style="stop-color:#fff;stop-opacity:0" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2416" y2="3.0816" gradientUnits="userSpaceOnUse" x2="18.379" gradientTransform="matrix(.95844 0 0 .95844 .99752 1.9975)" y1="44.98" x1="18.379">
|
||||
<stop id="stop2492" style="stop-color:#791235" offset="0"/>
|
||||
<stop id="stop2494" style="stop-color:#dd3b27" offset="1"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="radialGradient2414" gradientUnits="userSpaceOnUse" cy="3.99" cx="23.896" gradientTransform="matrix(0 2.2875 -3.0194 0 36.047 -50.63)" r="20.397">
|
||||
<stop id="stop3244" style="stop-color:#f8b17e" offset="0"/>
|
||||
<stop id="stop3246" style="stop-color:#e35d4f" offset=".26238"/>
|
||||
<stop id="stop3248" style="stop-color:#c6262e" offset=".66094"/>
|
||||
<stop id="stop3250" style="stop-color:#690b54" offset="1"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="radialGradient2419" gradientUnits="userSpaceOnUse" cy="4.625" cx="62.625" gradientTransform="matrix(2.1647 0 0 .75294 -111.56 36.518)" r="10.625">
|
||||
<stop id="stop8840" offset="0"/>
|
||||
<stop id="stop8842" style="stop-opacity:0" offset="1"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<g id="layer1">
|
||||
<g id="g3275">
|
||||
<path id="path8836" style="opacity:.3;fill-rule:evenodd;fill:url(#radialGradient2419)" d="m47 40c0 4.418-10.297 8-23 8s-23-3.582-23-8 10.297-8 23-8 23 3.582 23 8z"/>
|
||||
<path id="path2555" style="stroke-linejoin:round;stroke:url(#linearGradient2416);stroke-linecap:round;stroke-width:1.0037;fill:url(#radialGradient2414)" d="m24 5.5018c-10.758 0-19.498 8.7402-19.498 19.498-0.0002 10.758 8.74 19.498 19.498 19.498s19.498-8.74 19.498-19.498-8.74-19.498-19.498-19.498z"/>
|
||||
<path id="path8655" style="opacity:.4;stroke:url(#linearGradient2411);fill:none" d="m42.5 24.999c0 10.218-8.283 18.501-18.5 18.501s-18.5-8.283-18.5-18.501c0-10.217 8.283-18.499 18.5-18.499s18.5 8.282 18.5 18.499z"/>
|
||||
</g>
|
||||
<g id="g3243" transform="translate(51.075 .56862)">
|
||||
<path id="path3295" style="opacity:.2" d="m-29.451 12.554c0.563 5.5 1.208 10.961 1.687 16.482h1.53c0.397-5.302 1.038-10.571 1.501-15.867 0.236-1.254-0.408-2.742-1.732-3.047-1.308-0.3824-2.77 0.565-2.944 1.918-0.029 0.17-0.042 0.342-0.042 0.514zm-0.167 22.359c-0.059 1.637 1.742 2.92 3.28 2.401 1.489-0.38 2.274-2.252 1.51-3.583-0.683-1.375-2.687-1.829-3.84-0.776-0.582 0.479-0.968 1.194-0.95 1.958z"/>
|
||||
<path id="text2315" style="fill:#fff" d="m-29.451 13.555c0.563 5.499 1.208 10.96 1.687 16.481h1.53c0.397-5.301 1.038-10.571 1.501-15.866 0.236-1.254-0.408-2.743-1.732-3.048-1.308-0.382-2.77 0.565-2.944 1.918-0.029 0.17-0.042 0.342-0.042 0.515zm-0.167 22.358c-0.059 1.637 1.742 2.921 3.28 2.402 1.489-0.381 2.274-2.253 1.51-3.584-0.683-1.375-2.687-1.828-3.84-0.776-0.582 0.479-0.968 1.194-0.95 1.958z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
@ -117,7 +117,7 @@ void runningDeviceWidget::populate()
|
||||
myDevice->lblFWTag->setText(QString("Firmware tag: ")+devDesc.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/application-certificate.svg"));
|
||||
myDevice->lblCertified->setPixmap(pix);
|
||||
myDevice->lblCertified->setToolTip(tr("Official Firmware Build"));
|
||||
myDevice->lblCertified->setToolTip(tr("Tagged officially released firmware build"));
|
||||
|
||||
}
|
||||
else
|
||||
@ -125,7 +125,7 @@ void runningDeviceWidget::populate()
|
||||
myDevice->lblFWTag->setText(QString("Firmware tag: ")+devDesc.description);
|
||||
QPixmap pix = QPixmap(QString(":uploader/images/warning.svg"));
|
||||
myDevice->lblCertified->setPixmap(pix);
|
||||
myDevice->lblCertified->setToolTip(tr("Custom Firmware Build"));
|
||||
myDevice->lblCertified->setToolTip(tr("Untagged or custom firmware build"));
|
||||
}
|
||||
myDevice->lblGitCommitTag->setText("Git commit tag: "+devDesc.gitTag);
|
||||
myDevice->lblFWDate->setText(QString("Firmware date: ") + devDesc.buildDate);
|
||||
|
@ -11,5 +11,6 @@
|
||||
<file>images/deviceID-0101.svg</file>
|
||||
<file>images/application-certificate.svg</file>
|
||||
<file>images/warning.svg</file>
|
||||
<file>images/error.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
x
Reference in New Issue
Block a user