From a4bb61b58af804beae190315a4a07a82d808cdb6 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 4 Jul 2017 09:30:02 -0700 Subject: 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 --- core/qt-ble.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/qt-ble.cpp') 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; } -- cgit v1.2.3-70-g09d2