summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-26 06:27:08 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-26 04:39:32 -0700
commit394948e2cf39c44618dce16a288905bab581c611 (patch)
treeaf696d9ab864c745db662bb71e43179949878d58 /core/btdiscovery.cpp
parentd4ce7935404bfd0a048cdbc199dd55517c34eb1a (diff)
downloadsubsurface-394948e2cf39c44618dce16a288905bab581c611.tar.gz
Mares: improve BT discovery logic
At least in one of the logs we saw there seemed to be trailing spaces. It should be enough for the BT name to start with "Mares Genius" in order to be recognized. Suggested-by: Jef Driesen <jef@libdivecomputer.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index 36c1b4b9c..80e2285b8 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -77,7 +77,7 @@ static dc_descriptor_t *getDeviceType(QString btName)
// so let's just randomly pick one
product = "Quad";
// Some we can pick out directly
- if (btName == "Mares Genius")
+ if (btName.startsWith("Mares Genius"))
product = "Genius";
}