From ce4e0d32763853f3f230842984f244b0183397fb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 11 Aug 2018 12:20:21 -0700 Subject: Use hex USB VID/PID Except of course that the Android intent does give us these values in decimal. Signed-off-by: Dirk Hohndel --- android-mobile/res/xml/device_filter.xml | 24 ++++++++++++------------ android/res/xml/device_filter.xml | 24 ++++++++++++------------ core/serial_ftdi.c | 10 +++++----- mobile-widgets/qmlmanager.cpp | 16 ++++++++-------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/android-mobile/res/xml/device_filter.xml b/android-mobile/res/xml/device_filter.xml index 413daa61f..046b12f2b 100644 --- a/android-mobile/res/xml/device_filter.xml +++ b/android-mobile/res/xml/device_filter.xml @@ -2,27 +2,27 @@ - - - + + + - + - + - + - + - + - + - + - + - + diff --git a/android/res/xml/device_filter.xml b/android/res/xml/device_filter.xml index 413daa61f..046b12f2b 100644 --- a/android/res/xml/device_filter.xml +++ b/android/res/xml/device_filter.xml @@ -2,27 +2,27 @@ - - - + + + - + - + - + - + - + - + - + - + - + diff --git a/core/serial_ftdi.c b/core/serial_ftdi.c index d6c97f577..86d27c9ff 100644 --- a/core/serial_ftdi.c +++ b/core/serial_ftdi.c @@ -127,11 +127,11 @@ static int serial_ftdi_open_device (struct ftdi_context *ftdi_ctx) { INFO(0, "serial_ftdi_open_device called"); int accepted_pids[] = { - 24577, 24592, 24593, // 0x6001, 0x6010, 0x6011x - Suunto (Smart Interface), Heinrichs Weikamp - 24597, // 0x6015 - possibly Aqualung - 62560, // 0xF460, Oceanic - 63104, // 0xF680, Suunto - 34768, // 0x87D0, Cressi (Leonardo) + 0x6001, 0x6010, 0x6011, // Suunto (Smart Interface), Heinrichs Weikamp + 0x6015, // possibly Aqualung + 0xF460, // Oceanic + 0xF680, // Suunto + 0x87D0, // Cressi (Leonardo) }; int num_accepted_pids = 6; int i, pid, ret; diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 5ede64152..0c06f37ad 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1837,47 +1837,47 @@ void QMLManager::showDownloadPage(QString deviceString) .arg(productList["Atomic Aquatics"].indexOf("Cobalt")) .arg(connectionListModel.indexOf("USB device")); } - } else if (deviceString.contains("mVendorId=5267") && + } else if (deviceString.contains("mVendorId=5267") && // 0x1493 / 0x0030 deviceString.contains("mProductId=48")) { name = QString("%1;%2;%3") .arg(connectionListModel.indexOf("Suunto")) .arg(productList["Suunto"].indexOf("EON Steel")) .arg(connectionListModel.indexOf("USB device")); - } else if (deviceString.contains("mVendorId=5267") && + } else if (deviceString.contains("mVendorId=5267") && // 0x1493 / 0x0033 deviceString.contains("mProductId=51")) { name = QString("%1;%2;%3") .arg(connectionListModel.indexOf("Suunto")) .arg(productList["Suunto"].indexOf("EON Core")) .arg(connectionListModel.indexOf("USB device")); - } else if (deviceString.contains("mVendorId=11884") && + } else if (deviceString.contains("mVendorId=11884") && // 0x2e6c / 0x3201 deviceString.contains("mProductId=12801")) { name = QString("%1;%2;%3") .arg(connectionListModel.indexOf("Scubapro")) .arg(productList["Suunto"].indexOf("G2")) .arg(connectionListModel.indexOf("USB device")); - } else if (deviceString.contains("mVendorId=49745") && + } else if (deviceString.contains("mVendorId=49745") && // 0xc251 / 0x2006 deviceString.contains("mProductId=8198")) { name = QString("%1;%2;%3") .arg(connectionListModel.indexOf("Scubapro")) .arg(productList["Suunto"].indexOf("Aladin Square")) .arg(connectionListModel.indexOf("USB device")); - } else if (deviceString.contains("mVendorId=1027") && + } else if (deviceString.contains("mVendorId=1027") && // 0x0403 / 0x6001,0x6010,0x6011,0x6015 (deviceString.contains("mProductId=24577") || deviceString.contains("mProductId=24592") || deviceString.contains("mProductId=24593") || deviceString.contains("mProductId=24597"))) { name = QString("-1;-1;%1").arg(connectionListModel.indexOf("FTDI")); - } else if (deviceString.contains("mVendorId=1027") && + } else if (deviceString.contains("mVendorId=1027") && // 0x0403 / 0xf460 deviceString.contains("mProductId=62560")) { name = QString("%1;-1;%2") .arg(vendorList.indexOf("Oceanic")) .arg(connectionListModel.indexOf("FTDI")); - } else if (deviceString.contains("mVendorId=1027") && + } else if (deviceString.contains("mVendorId=1027") && // 0x0403 / 0xf680 deviceString.contains("mProductId=63104")) { name = QString("%1;-1;%2") .arg(vendorList.indexOf("Suunto")) .arg(connectionListModel.indexOf("FTDI")); - } else if (deviceString.contains("mVendorId=1027") && + } else if (deviceString.contains("mVendorId=1027") && // 0x0403 / 0x87d0 deviceString.contains("mProductId=34768")) { name = QString("%1;-1;%2") .arg(vendorList.indexOf("Cressi")) -- cgit v1.2.3-70-g09d2