mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
b9ac6334c7
commit
a568562503
2 changed files with 9 additions and 3 deletions
|
@ -98,7 +98,7 @@ struct mydescriptor {
|
||||||
* stay like this for now.
|
* stay like this for now.
|
||||||
*/
|
*/
|
||||||
void fill_computer_list();
|
void fill_computer_list();
|
||||||
extern QStringList vendorList;
|
extern QStringList vendorList;
|
||||||
extern QHash<QString, QStringList> productList;
|
extern QHash<QString, QStringList> productList;
|
||||||
extern QMap<QString, dc_descriptor_t *> descriptorLookup;
|
extern QMap<QString, dc_descriptor_t *> descriptorLookup;
|
||||||
|
|
||||||
|
|
|
@ -206,8 +206,14 @@ void QMLManager::mergeLocalRepo()
|
||||||
#if BT_SUPPORT
|
#if BT_SUPPORT
|
||||||
void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||||
{
|
{
|
||||||
QString newDevice = "Found new device " + device.name() + " (" + device.address().toString() + ")";
|
QString newDevice = device.name();
|
||||||
appendTextToLog(newDevice);
|
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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue