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>
This commit is contained in:
Dirk Hohndel 2019-10-26 06:27:08 -04:00
parent d4ce793540
commit 394948e2cf

View file

@ -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";
}