32 #ifndef UPLOADERGADGETWIDGET_H
33 #define UPLOADERGADGETWIDGET_H
46 class QNetworkAccessManager;
47 class Ui_UploaderWidget;
49 using namespace tl_dfu;
73 void onAutopilotConnect();
74 void onAutopilotDisconnect();
75 void onAutopilotReady();
77 void onLoadFirmwareButtonClick();
78 void onFlashButtonClick();
79 void onRescueButtonClick();
80 void onExportButtonClick();
81 void onBootloaderDetected();
82 void onBootloaderRemoved();
84 void onStatusUpdate(QString,
int);
85 void onPartitionSave();
86 void onPartitionFlash();
87 void onPartitionErase();
88 void onBootButtonClick();
90 void onDeviceDiscovered();
93 void FirmwareOnDeviceClear(
bool clear);
94 void FirmwareLoadedClear(
bool clear);
95 void PartitionBrowserClear();
96 void DeviceInformationClear();
97 void DeviceInformationUpdate(
deviceInfo board);
99 void FirmwareLoadedUpdate(QByteArray firmwareArray);
100 QString LoadFirmwareFileDialog(QString);
103 void CheckAutopilotReady();
104 bool CheckInBootloaderState();
107 QString getImagePath(QString boardName, QString imageType = QString(
"fw"));
108 bool FirmwareLoadFromFile(QString filename, QByteArray *contents);
110 void triggerPartitionDownload(
int index);
111 void haltOrReset(
bool halting);
113 bool tradeSettingsWithCloud(QString srcRelease, QString ancestor,
bool upgrading =
false,
114 QByteArray *settingsOut = NULL);
115 int isCloudReleaseAvailable(QString srcRelease);
117 bool saveSettings(
const QByteArray &settingsDump);
119 bool askIfShouldContinue();
120 bool downloadSettings();
121 void stepChangeAndDelay(QEventLoop &loop,
int delayMs,
124 void upgradeError(QString why);
125 bool flashFirmware(QByteArray &firmwareImage);
126 bool haveSettingsPart()
const;
128 Ui_UploaderWidget *m_widget;
132 bool telemetryConnected;
135 QByteArray loadedFile;
136 QByteArray settingsDump;
145 QNetworkAccessManager *netMngr;
148 FirmwareIAPObj *firmwareIap;
153 QByteArray tempArray;
155 bool upgraderActive =
false;
157 const QString exportUrl = QString(
"http://dronin-autotown.appspot.com/convert");
158 const QString hasRevUrl = QString(
"http://dronin-autotown.appspot.com/uavos/%1");
161 #endif // UPLOADERGADGETWIDGET_H
Core plugin system that manages the plugins, their life cycle and their registered objects...