summaryrefslogtreecommitdiffstats
path: root/core/qt-ble.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 09:30:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 09:30:05 -0700
commita4bb61b58af804beae190315a4a07a82d808cdb6 (patch)
tree5adc9f4a524d9509ac4ef8dbbb12cfd3df497de5 /core/qt-ble.cpp
parent8a1f5b9566159d35e4ce9bc6e99afc7e7bec9927 (diff)
downloadsubsurface-a4bb61b58af804beae190315a4a07a82d808cdb6.tar.gz
BLE download: EON Steel doesn't want to loop over reads
This seems a bit brutal, but it does the trick and makes EON Steel downloads work again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/qt-ble.cpp')
-rw-r--r--core/qt-ble.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp
index 2ca547b58..61a0c5647 100644
--- a/core/qt-ble.cpp
+++ b/core/qt-ble.cpp
@@ -24,6 +24,7 @@
#define IS_HW(_d) same_string((_d)->vendor, "Heinrichs Weikamp")
#define IS_SHEARWATER(_d) same_string((_d)->vendor, "Shearwater")
+#define IS_EON_STEEL(_d) same_string((_d)->product, "EON Steel")
extern "C" {
@@ -205,9 +206,13 @@ dc_status_t BLEObject::read(void *data, size_t size, size_t *actual)
memcpy((char *)data + offset, packet.data(), packet.size());
offset += packet.size();
*actual += packet.size();
+ // EON Steel wants to read only one packet at a time
+ if (IS_EON_STEEL(device))
+ goto we_are_done;
}
waitFor(50); // and process some Qt events to see if there is more data coming in.
}
+we_are_done:
return DC_STATUS_SUCCESS;
}