Add support for the new Ratio bluetooth name

The new Ratio iX3M 2 models use "RATIO-" as the prefix in the bluetooth
name instead of "IX5M".

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
This commit is contained in:
Jef Driesen 2023-10-05 21:25:51 +02:00 committed by Michael Keller
parent 3c5f22ac25
commit c7b7c3f691

View file

@ -108,7 +108,8 @@ static dc_descriptor_t *getDeviceType(QString btName)
// but that seems to be just happenstance.
vendor = "Ratio";
product = "iX3M 2021 GPS Easy"; // we don't know which of the Bluetooth models, so set one that supports BLE
} else if (btName.contains(QRegularExpression("^IX5M\\d{6}"))) {
} else if (btName.contains(QRegularExpression("^IX5M\\d{6}")) ||
btName.contains(QRegularExpression("^RATIO-\\d{6}"))) {
// The 2021 iX3M models (square buttons) report as iX5M,
// eventhough the physical model states iX3M.
vendor = "Ratio";