[PATCH 3/3] Notify Ostc 4 users about new firmwares
Anton Lundin
glance at acc.umu.se
Wed Dec 28 11:56:15 PST 2016
This adds support for notifying Ostc 4 users about new firmwares when
they download dives from their computers, gives them the option to
trigger the download flow.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
desktop-widgets/configuredivecomputerdialog.cpp | 5 ++++-
desktop-widgets/downloadfromdivecomputer.cpp | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp
index 9ee8a0b..6c1d44d 100644
--- a/desktop-widgets/configuredivecomputerdialog.cpp
+++ b/desktop-widgets/configuredivecomputerdialog.cpp
@@ -233,6 +233,9 @@ OstcFirmwareCheck::OstcFirmwareCheck(QString product) : parent(0)
} else if (product == "OSTC Sport") {
url = QUrl("http://www.heinrichsweikamp.net/autofirmware/ostc_sport_changelog.txt");
latestFirmwareHexFile = QString("http://www.heinrichsweikamp.net/autofirmware/ostc_sport_firmware.hex");
+ } else if (product == "OSTC 4") {
+ url = QUrl("http://www.heinrichsweikamp.net/autofirmware/ostc4_changelog.txt");
+ latestFirmwareHexFile = QString("http://www.heinrichsweikamp.net/autofirmware/ostc4_firmware.bin");
} else { // not one of the known dive computers
return;
}
@@ -294,7 +297,7 @@ void OstcFirmwareCheck::upgradeFirmware()
QFileInfo fi(filename);
filename = fi.absolutePath().append(QDir::separator()).append(saveFileName);
storeFirmware = QFileDialog::getSaveFileName(parent, tr("Save the downloaded firmware as"),
- filename, tr("HEX files (*.hex)"));
+ filename, tr("Firmware files (*.hex *.bin)"));
if (storeFirmware.isEmpty())
return;
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp
index 2fa68b5..d854cab 100644
--- a/desktop-widgets/downloadfromdivecomputer.cpp
+++ b/desktop-widgets/downloadfromdivecomputer.cpp
@@ -367,7 +367,8 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked()
QString product(ui.product->currentText());
if (product == "OSTC 3" || product == "OSTC 3+" ||
- product == "OSTC Cr" || product == "OSTC Sport")
+ product == "OSTC Cr" || product == "OSTC Sport" ||
+ product == "OSTC 4")
ostcFirmwareCheck = new OstcFirmwareCheck(product);
}
--
2.9.3
More information about the subsurface
mailing list