mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0be0cdb046
commit
003f5d18b6
3 changed files with 73 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue