mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
GCS/Uploader Changes acording to review
Changed template comments. Added UAVO hash to the GCS help dialog
This commit is contained in:
parent
4e08fa548f
commit
c8de27cbaf
@ -67,6 +67,26 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
//: This gets conditionally inserted as argument %8 into the description string.
|
||||
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(GCS_REVISION_STR).left(60));
|
||||
#endif
|
||||
QString uavoHashStr;
|
||||
#ifdef UAVO_HASH
|
||||
//: This gets conditionally inserted as argument %11 into the description string.
|
||||
QByteArray uavoHashArray;
|
||||
QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR);
|
||||
uavoHash.chop(2);
|
||||
uavoHash.remove(0,2);
|
||||
uavoHash=uavoHash.trimmed();
|
||||
bool ok;
|
||||
foreach(QString str,uavoHash.split(","))
|
||||
{
|
||||
uavoHashArray.append(str.toInt(&ok,16));
|
||||
}
|
||||
QString gcsUavoHashStr;
|
||||
foreach(char i, uavoHashArray)
|
||||
{
|
||||
gcsUavoHashStr.append(QString::number(i,16).right(2));
|
||||
}
|
||||
uavoHashStr = tr("UAVO hash %1<br/>").arg(gcsUavoHashStr);
|
||||
#endif
|
||||
|
||||
const QString description = tr(
|
||||
"<h3>OpenPilot GCS %1 %9 (%10)</h3>"
|
||||
@ -76,6 +96,8 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
"<br/>"
|
||||
"%8"
|
||||
"<br/>"
|
||||
"%11"
|
||||
"<br/>"
|
||||
"Copyright 2010-%6 %7. All rights reserved.<br/>"
|
||||
"<br/>"
|
||||
"<small>This program is free software; you can redistribute it and/or modify<br/>"
|
||||
@ -87,7 +109,7 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
"PARTICULAR PURPOSE.</small><br/>")
|
||||
.arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(GCS_YEAR),
|
||||
(QLatin1String(GCS_AUTHOR)), ideRev).arg(QLatin1String(GCS_VERSION_TYPE), QLatin1String(GCS_VERSION_CODENAME));
|
||||
(QLatin1String(GCS_AUTHOR)), ideRev).arg(QLatin1String(GCS_VERSION_TYPE), QLatin1String(GCS_VERSION_CODENAME), uavoHashStr);
|
||||
|
||||
QLabel *copyRightLabel = new QLabel(description);
|
||||
copyRightLabel->setWordWrap(true);
|
||||
|
@ -684,7 +684,7 @@ void UploaderGadgetWidget::versionMatchCheck()
|
||||
|
||||
QString warning = QString(tr(
|
||||
"GCS and firmware versions of the UAV objects set do not match which can cause configuration problems. "
|
||||
"GCS version: %1. Firmware version: %2.")).arg(gcsVersion).arg(fwVersion);
|
||||
"GCS version: %1 Firmware version: %2.")).arg(gcsVersion).arg(fwVersion);
|
||||
msg->showMessage(warning);
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,6 @@
|
||||
/**
|
||||
* We have 100 bytes for the whole description.
|
||||
*
|
||||
* Only the first 40 are visible on the FirmwareIAP uavobject, the remaining
|
||||
* 60 are ok to use for packaging and will be saved in the flash.
|
||||
*
|
||||
* Structure is:
|
||||
* 4 bytes: header: "OpFw".
|
||||
@ -39,7 +37,6 @@
|
||||
* 4 bytes: Unix timestamp of compile time.
|
||||
* 2 bytes: target platform. Should follow same rule as BOARD_TYPE and BOARD_REVISION in board define files.
|
||||
* 26 bytes: commit tag if it is there, otherwise branch name. '-dirty' may be added if needed. Zero-padded.
|
||||
* ---- 40 bytes limit ---
|
||||
* 20 bytes: SHA1 sum of the firmware.
|
||||
* 20 bytes: SHA1 sum of the uavo definitions.
|
||||
* 20 bytes: free for now.
|
||||
|
Loading…
Reference in New Issue
Block a user