BLE support: the G2 wants packages one at a time

Just like the EON Steel it doesn't want us to loop until all packages
have been received.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-09 11:57:32 -07:00
parent 4b9ba4c367
commit 55df597994

View file

@ -28,6 +28,7 @@ static int debugCounter;
#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")
#define IS_G2(_d) same_string((_d)->product, "G2")
extern "C" {
@ -210,7 +211,7 @@ dc_status_t BLEObject::read(void *data, size_t size, size_t *actual)
offset += packet.size();
*actual += packet.size();
// EON Steel wants to read only one packet at a time
if (IS_EON_STEEL(device))
if (IS_EON_STEEL(device) || IS_G2(device))
goto we_are_done;
}
waitFor(50); // and process some Qt events to see if there is more data coming in.