Mares: add BT discovery logic

We don't have the "show all dive computers" logic on mobile, so we need
something like this.

Possibly we should use the libdivecomputer matching code if it exists,
but that's a much bigger change, let's do this incremental one for now.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2019-10-25 07:25:03 -04:00 committed by Dirk Hohndel
parent 96386fbcc1
commit 7273161acf

View file

@ -71,11 +71,14 @@ static dc_descriptor_t *getDeviceType(QString btName)
if (btName.startsWith("Aladin")) product = "Aladin Sport Matrix";
}
if (btName == "Mares bluelink pro") {
if (btName.startsWith("Mares")) {
vendor = "Mares";
// we don't know which of the dive computers it is,
// so let's just randomly pick one
product = "Quad";
// Some we can pick out directly
if (btName == "Mares Genius")
product = "Genius";
}
// The Pelagic dive computers (generally branded as Oceanic or Aqualung)