diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-10 14:47:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-10 17:18:17 -0700 |
commit | 55bbdc2728854d06a26b59d7402b9ba948e82a60 (patch) | |
tree | 8761461903c5794828dadacea63c16966337173d /core | |
parent | b241d096947a482ee9501cb87228df582a1a01ef (diff) | |
download | subsurface-55bbdc2728854d06a26b59d7402b9ba948e82a60.tar.gz |
BLE dive computer detection
Both Shearwater Petrel and Petrel 2 identify as 'Petrel' as their BT and BLE
names. But only the Petrel 2 supports BLE, thus only the Petrel 2 shows up in
the list of known dive computers on iOS (which supports only BLE but not
BT-only). By switching this around to always pick Petrel 2 we now correctly
detect such a dive computer on iOS.
Fixes #2739
Reported-by: Rick Holcombe <wrh@nc.rr.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/btdiscovery.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index ce12f40d6..396ba4867 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -42,7 +42,10 @@ static dc_descriptor_t *getDeviceType(QString btName) btName.startsWith("Teric") || btName.startsWith("NERD")) { vendor = "Shearwater"; - if (btName.startsWith("Petrel")) product = "Petrel"; // or petrel 2? + // both the Petrel and Petrel 2 identify as "Petrel" as BT/BLE device + // but only the Petrel 2 is listed as available dive computer on iOS (which requires BLE support) + // so always pick the "Petrel 2" as product when seeing a Petrel + if (btName.startsWith("Petrel")) product = "Petrel 2"; if (btName.startsWith("Perdix")) product = "Perdix"; if (btName.startsWith("Predator")) product = "Predator"; if (btName.startsWith("Teric")) product = "Teric"; |