summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-28 10:22:46 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-28 10:22:46 -0800
commit003f5d18b64d14d941a774086472918f203a063d (patch)
tree41d31bcfc4cdd6e1be789501d200688b4c05425f /qt-ui/configuredivecomputerdialog.h
parent0be0cdb046018a5ec633bfc6f0aacba20d5c35e2 (diff)
downloadsubsurface-003f5d18b64d14d941a774086472918f203a063d.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.h')
-rw-r--r--qt-ui/configuredivecomputerdialog.h14
1 files changed, 10 insertions, 4 deletions
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 <QStyledItemDelegate>
-#include <QWebPage>
+#include <QNetworkAccessManager>
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