mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
8a1f5b9566
commit
a4bb61b58a
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue