Changeset a568562 in subsurface


Ignore:
Timestamp:
May 29, 2017, 12:25:21 PM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
5c4f998
Parents:
b9ac633
Message:

QML UI: try to match BT names to known dive computers

So far this just adds data to the log.

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/downloadfromdcthread.h

    r271b4ca ra568562  
    9999*/
    100100void fill_computer_list();
    101 extern  QStringList vendorList;
     101extern QStringList vendorList;
    102102extern QHash<QString, QStringList> productList;
    103103extern QMap<QString, dc_descriptor_t *> descriptorLookup;
  • mobile-widgets/qmlmanager.cpp

    r1ab6b50a ra568562  
    207207void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
    208208{
    209         QString newDevice = "Found new device " + device.name() + " (" + device.address().toString() + ")";
    210         appendTextToLog(newDevice);
     209        QString newDevice = device.name();
     210        appendTextToLog("Found new device " + newDevice + " (" + device.address().toString() + ")");
     211        QString vendor, product;
     212        foreach (vendor, productList.keys()) {
     213                if (productList[vendor].contains(newDevice)) {
     214                        appendTextToLog("this could be a " + vendor + " " + newDevice);
     215                }
     216        }
    211217}
    212218#endif
Note: See TracChangeset for help on using the changeset viewer.