From 003f5d18b64d14d941a774086472918f203a063d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 28 Dec 2014 10:22:46 -0800 Subject: Automatic OSTC firmware update: download file and try to install This successfully downloads the hex file. The actuall update of the OSTC fails before it gets started with a crash when the ConfigureDiveComputer object is created. Signed-off-by: Dirk Hohndel --- qt-ui/configuredivecomputerdialog.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'qt-ui/configuredivecomputerdialog.h') diff --git a/qt-ui/configuredivecomputerdialog.h b/qt-ui/configuredivecomputerdialog.h index 3e3262df4..e36e88d1f 100644 --- a/qt-ui/configuredivecomputerdialog.h +++ b/qt-ui/configuredivecomputerdialog.h @@ -7,7 +7,7 @@ #include "../libdivecomputer.h" #include "configuredivecomputer.h" #include -#include +#include class GasSpinBoxItemDelegate : public QStyledItemDelegate { @@ -107,13 +107,19 @@ class OstcFirmwareCheck : QObject Q_OBJECT public: explicit OstcFirmwareCheck(QString product); - void checkLatest(QWidget *parent, uint32_t firmwareOnDevice); + void checkLatest(QWidget *parent, device_data_t *data); public slots: - void parseOstcFwVersion(); + void parseOstcFwVersion(QNetworkReply *reply); + void saveOstcFirmware(QNetworkReply * reply); private: - QWebPage hwVersionPage; + void upgradeFirmware(); + device_data_t devData; QString latestFirmwareAvailable; + QString latestFirmwareHexFile; + QString storeFirmware; + QWidget *parent; + QNetworkAccessManager manager; }; #endif // CONFIGUREDIVECOMPUTERDIALOG_H -- cgit v1.2.3-70-g09d2