Browse Source

Hacking on uploader

QGC4.4
Lorenz Meier 12 years ago
parent
commit
1923fb95a5
  1. 2
      src/PX4FirmwareUpgradeWorker.cc
  2. 4
      src/PX4FirmwareUpgradeWorker.h
  3. 18
      src/apps/qupgrade/QUpgradeApp.cc

2
src/PX4FirmwareUpgradeWorker.cc

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#include <QJsonDocument>
//#include <QJsonDocument>
#include <QFile>
#include "PX4FirmwareUpgradeWorker.h"

4
src/PX4FirmwareUpgradeWorker.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#define PX4FIRMWAREUPGRADEWORKER_H
#include <QObject>
#include <QJsonDocument>
//#include <QJsonDocument>
#include <SerialLink.h>
@ -67,7 +67,7 @@ protected: @@ -67,7 +67,7 @@ protected:
private:
SerialLink *link;
bool insync;
QJsonDocument firmware;
//QJsonDocument firmware;
};
#endif // PX4FIRMWAREUPGRADEWORKER_H

18
src/apps/qupgrade/QUpgradeApp.cc

@ -78,15 +78,15 @@ QUpgradeApp::QUpgradeApp(int &argc, char* argv[]) : QApplication(argc, argv) @@ -78,15 +78,15 @@ QUpgradeApp::QUpgradeApp(int &argc, char* argv[]) : QApplication(argc, argv)
// Get PX4 upgrade widget and instantiate worker thread
PX4FirmwareUpgradeWorker* worker = PX4FirmwareUpgradeWorker::putWorkerInThread(this);
connect(worker, SIGNAL(detectionStatusChanged(QString)), upgrader, SLOT(setDetectionStatusText(QString)), Qt::QueuedConnection);
connect(worker, SIGNAL(upgradeStatusChanged(QString)), upgrader, SLOT(setFlashStatusText(QString)), Qt::QueuedConnection);
connect(worker, SIGNAL(upgradeProgressChanged(int)), upgrader, SLOT(setFlashProgress(int)), Qt::QueuedConnection);
connect(worker, SIGNAL(validPortFound(QString)), upgrader, SLOT(setPortName(QString)));
connect(upgrader, SIGNAL(firmwareFileNameSet(QString)), worker, SLOT(loadFirmware(QString)), Qt::QueuedConnection);
connect(upgrader, SIGNAL(upgrade()), worker, SLOT(upgrade()), Qt::QueuedConnection);
connect(this, SIGNAL(lastWindowClosed()), worker, SLOT(abort()), Qt::QueuedConnection);
worker->loadFirmware("/Users/user/src/Firmware/Images/px4io.bin");
// connect(worker, SIGNAL(detectionStatusChanged(QString)), upgrader, SLOT(setDetectionStatusText(QString)), Qt::QueuedConnection);
// connect(worker, SIGNAL(upgradeStatusChanged(QString)), upgrader, SLOT(setFlashStatusText(QString)), Qt::QueuedConnection);
// connect(worker, SIGNAL(upgradeProgressChanged(int)), upgrader, SLOT(setFlashProgress(int)), Qt::QueuedConnection);
// connect(worker, SIGNAL(validPortFound(QString)), upgrader, SLOT(setPortName(QString)));
// connect(upgrader, SIGNAL(firmwareFileNameSet(QString)), worker, SLOT(loadFirmware(QString)), Qt::QueuedConnection);
// connect(upgrader, SIGNAL(upgrade()), worker, SLOT(upgrade()), Qt::QueuedConnection);
// connect(this, SIGNAL(lastWindowClosed()), worker, SLOT(abort()), Qt::QueuedConnection);
worker->loadFirmware("/Users/lomeier/src/Firmware/Images/px4fmu.bin");
window->setWindowTitle(applicationName() + " " + applicationVersion());
window->show();

Loading…
Cancel
Save