mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Added the basis for GCS and FW version mismatch warning.
This commit is contained in:
parent
3e4a33169c
commit
ad13cee7a1
@ -212,8 +212,9 @@ QString UAVSettingsImportExportFactory::createXMLDocument(
|
||||
QDomElement fw=doc.createElement("Embedded");
|
||||
UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||
|
||||
fw.setAttribute("gitcommittag",utilMngr->getBoardDescriptionStruct().gitTag);
|
||||
fw.setAttribute("fwtag",utilMngr->getBoardDescriptionStruct().description);
|
||||
deviceDescriptorStruct struc=utilMngr->getBoardDescriptionStruct();
|
||||
fw.setAttribute("gitcommittag",struc.gitTag);
|
||||
fw.setAttribute("fwtag",struc.description);
|
||||
fw.setAttribute("cpuSerial",QString(utilMngr->getBoardCPUSerial().toHex()));
|
||||
|
||||
versionInfo.appendChild(fw);
|
||||
|
@ -25,6 +25,8 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "uploadergadgetwidget.h"
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <QErrorMessage>
|
||||
|
||||
#define DFU_DEBUG true
|
||||
|
||||
@ -42,6 +44,8 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
|
||||
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()));
|
||||
connect(telMngr, SIGNAL(connected()), this, SLOT(versionMatchCheck()));
|
||||
|
||||
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()));
|
||||
|
||||
connect(m_config->haltButton, SIGNAL(clicked()), this, SLOT(goToBootloader()));
|
||||
@ -603,3 +607,21 @@ void UploaderGadgetWidget::info(QString infoString, int infoNumber)
|
||||
Q_UNUSED(infoNumber);
|
||||
m_config->boardStatus->setText(infoString);
|
||||
}
|
||||
|
||||
void UploaderGadgetWidget::versionMatchCheck()
|
||||
{
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||
deviceDescriptorStruct boardDescription=utilMngr->getBoardDescriptionStruct();
|
||||
QString gcsDescription=QString::fromLatin1(Core::Constants::GCS_REVISION_STR);
|
||||
/*TODO compare logic
|
||||
if()
|
||||
{
|
||||
}*/
|
||||
QString version;
|
||||
QErrorMessage msg(this);
|
||||
msg.showMessage(QString("Incompatible GCS and FW detected, you should upgrade your GCS to %1 version").arg(version));
|
||||
msg.showMessage(QString("Incompatible GCS and FW detected, you should upgrade your board's Firmware to %1 version").arg(version));
|
||||
|
||||
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ private:
|
||||
QEventLoop m_eventloop;
|
||||
private slots:
|
||||
void onPhisicalHWConnect();
|
||||
void versionMatchCheck();
|
||||
void error(QString errorString,int errorNumber);
|
||||
void info(QString infoString,int infoNumber);
|
||||
void goToBootloader(UAVObject* = NULL, bool = false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user