From 55bbdc2728854d06a26b59d7402b9ba948e82a60 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 10 Apr 2020 14:47:36 -0700 Subject: 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 Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core') 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"; -- cgit v1.2.3-70-g09d2