diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-05-11 22:18:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-11 22:18:19 -0700 |
commit | cef6dff762fa8bd6bd62db1c1b6af1a6f375406d (patch) | |
tree | cde1382bebae5b2d8202640334e8ea7a199eb77a /core | |
parent | e6cb98ea4be1c905cb01b58ebd9a2d4f573e4f5b (diff) | |
download | subsurface-cef6dff762fa8bd6bd62db1c1b6af1a6f375406d.tar.gz |
BLE: add EON Core and Mares Bluelink to detection
Detection isn't required, but it makes things easier. For the Mares dive
computers we only see the Bluelink, so we can't tell which dive computer is
connected to it. We guess "Quad", but the user can pick a different one.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/btdiscovery.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 1848b8442..ba4d7b1ce 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -40,12 +40,24 @@ static dc_descriptor_t *getDeviceType(QString btName) product = "EON Steel"; } + if (btName.startsWith("EON Core")) { + vendor = "Suunto"; + product = "EON Core"; + } + if (btName.startsWith("G2") || btName.startsWith("Aladin")) { vendor = "Scubapro"; if (btName.startsWith("G2")) product = "G2"; if (btName.startsWith("Aladin")) product = "Aladin Sport Matrix"; } + if (btName == "Mares bluelink pro") { + vendor = "Mares"; + // we don't know which of the dive computers it is, + // so let's just randomly pick one + product = "Quad"; + } + if (!vendor.isEmpty() && !product.isEmpty()) return descriptorLookup.value(vendor + product); |