From 5142d7409f9dc9a102ae9b5898b43b57621c660c Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sat, 10 Jun 2017 14:22:28 +0200 Subject: Mobile: add BT name to vendor/product capability This adds a central function to convert a BT name to a vendor/product pair known to Subsurface. This allows interfacing from a paired BT dive computer, without actively selecting its type, but by selecting it from the list of paired BT devices. So, after this, downloading from multiple (paired) DCs is also possible. And not the niced piece of code ... Signed-off-by: Jan Mulder Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DownloadFromDiveComputer.qml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml') diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 80aaaa251..66504c866 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -93,6 +93,13 @@ Kirigami.Page { comboProduct.currentText) if (addr !== "") downloadThread.deviceData.devName = addr + var vendor = downloadThread.deviceData.getDeviceDescriptorVendor(comboVendor.currentText, + comboProduct.currentText) + downloadThread.deviceData.vendor = vendor; + + var product = downloadThread.deviceData.getDeviceDescriptorProduct(comboVendor.currentText, + comboProduct.currentText) + downloadThread.deviceData.product = product; } manager.appendTextToLog("DCDownloadThread started for " + downloadThread.deviceData.devName) downloadThread.start() -- cgit v1.2.3-70-g09d2