#ifndef APMFIRMWARECONFIG_H #define APMFIRMWARECONFIG_H #include #include #include #include #include #include #include #include #include #include #include "qserialport.h" #include "ui_ApmFirmwareConfig.h" #include "ApmFirmwareStatus.h" class ApmFirmwareConfig : public QWidget { Q_OBJECT public: explicit ApmFirmwareConfig(QWidget *parent = 0); ~ApmFirmwareConfig(); private slots: void firmwareListFinished(); void firmwareListError(QNetworkReply::NetworkError error); void burnButtonClicked(); void betaFirmwareButtonClicked(bool betafirmwareenabled); void downloadFinished(); void firmwareProcessFinished(int status); void firmwareProcessReadyRead(); void firmwareProcessError(QProcess::ProcessError error); void firmwareDownloadProgress(qint64 received,qint64 total); private: //ApmFirmwareStatus *firmwareStatus; QString m_detectedComPort; QTemporaryFile *m_tempFirmwareFile; QNetworkAccessManager *m_networkManager; void requestFirmwares(); void requestBetaFirmwares(); bool stripVersionFromGitReply(QString url,QString reply,QString type,QString stable,QString *out); bool m_betaFirmwareChecked; QMap m_buttonToUrlMap; Ui::ApmFirmwareConfig ui; class FirmwareDef { public: QString url; QString url2560; QString url25602; QString urlpx4; QString type; QString name; QString desc; int version; }; QList m_firmwareList; }; #endif // APMFIRMWARECONFIG_H