mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
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>
This commit is contained in:
parent
b241d09694
commit
55bbdc2728
1 changed files with 4 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue