diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-29 12:25:21 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-29 12:25:21 -0700 |
commit | a5685625035307e644a5454488f1818ac61dea2d (patch) | |
tree | e1105e6d231c214ce9324463a1fa1931df51dc85 | |
parent | b9ac6334c79f1272a369e325386cfaf0b0ec9d7c (diff) | |
download | subsurface-a5685625035307e644a5454488f1818ac61dea2d.tar.gz |
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@hohndel.org>
-rw-r--r-- | core/downloadfromdcthread.h | 2 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h index 9e99e1a42..bf203a85f 100644 --- a/core/downloadfromdcthread.h +++ b/core/downloadfromdcthread.h @@ -98,7 +98,7 @@ struct mydescriptor { * stay like this for now. */ void fill_computer_list(); -extern QStringList vendorList; +extern QStringList vendorList; extern QHash<QString, QStringList> productList; extern QMap<QString, dc_descriptor_t *> descriptorLookup; diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index f10564a94..510866137 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -206,8 +206,14 @@ void QMLManager::mergeLocalRepo() #if BT_SUPPORT void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device) { - QString newDevice = "Found new device " + device.name() + " (" + device.address().toString() + ")"; - appendTextToLog(newDevice); + QString newDevice = device.name(); + appendTextToLog("Found new device " + newDevice + " (" + device.address().toString() + ")"); + QString vendor, product; + foreach (vendor, productList.keys()) { + if (productList[vendor].contains(newDevice)) { + appendTextToLog("this could be a " + vendor + " " + newDevice); + } + } } #endif |