Changeset b9760f1 in subsurface


Ignore:
Timestamp:
May 31, 2017, 10:16:29 AM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
4ed6ae0d
Parents:
2a71559
git-author:
Dirk Hohndel <dirk@…> (05/31/17 10:12:21)
git-committer:
Dirk Hohndel <dirk@…> (05/31/17 10:16:29)
Message:

QML UI: try to also detect OSTC BT dive computers

The naming scheme of OSTC dive computers doesn't match their product names,
but they all behave the same from a download perspective, so we assume that
any BT device that has a name starting with OSTC is an OSTC 3.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    r286bac6 rb9760f1  
    211211{
    212212        QString newDevice = device.name();
     213        // all the HW OSTC BT computers show up as "OSTC" + some other text, depending on model
     214        if (newDevice.startsWith("OSTC"))
     215                newDevice = "OSTC 3";
    213216        QList<QBluetoothUuid> serviceUuids = device.serviceUuids();
    214217        foreach (QBluetoothUuid id, serviceUuids) {
     
    220223        foreach (vendor, productList.keys()) {
    221224                if (productList[vendor].contains(newDevice)) {
    222                         appendTextToLog("this could be a " + vendor + " " + newDevice);
     225                        appendTextToLog("this could be a " + vendor + " " +
     226                                        (newDevice == "OSTC 3" ? "OSTC family" : newDevice));
    223227                        struct btVendorProduct btVP;
    224228                        btVP.btdi = device;
Note: See TracChangeset for help on using the changeset viewer.