aboutsummaryrefslogtreecommitdiffstats
path: root/core/qt-ble.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-09 11:57:32 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-09 11:57:32 -0700
commit55df5979941c924ce66b491f54ccbad0c3e7c232 (patch)
tree8ffa22dba5b1964db1142b8bb6c94bd688817ded /core/qt-ble.cpp
parent4b9ba4c36798bbaaaad3330399190d604b93b86d (diff)
downloadsubsurface-55df5979941c924ce66b491f54ccbad0c3e7c232.tar.gz
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>
Diffstat (limited to 'core/qt-ble.cpp')
-rw-r--r--core/qt-ble.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp
index ff4bc3eda..0ce52bc02 100644
--- a/core/qt-ble.cpp
+++ b/core/qt-ble.cpp
@@ -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.