aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 12:20:21 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-12 15:37:21 -0700
commitce4e0d32763853f3f230842984f244b0183397fb (patch)
treed60c817abed34b3c1ae05be3d93121939733d07a
parent612f1b478f785331504fc4a22c1546536d2f345f (diff)
downloadsubsurface-ce4e0d32763853f3f230842984f244b0183397fb.tar.gz
Use hex USB VID/PID
Except of course that the Android intent does give us these values in decimal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--android-mobile/res/xml/device_filter.xml24
-rw-r--r--android/res/xml/device_filter.xml24
-rw-r--r--core/serial_ftdi.c10
-rw-r--r--mobile-widgets/qmlmanager.cpp16
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 @@
<resources>
<!-- FTDI Chips -->
<!-- (Smart Interface), Heinrichs Weikamp -->
- <usb-device vendor-id="1027" product-id="24577"/>
- <usb-device vendor-id="1027" product-id="24592"/>
- <usb-device vendor-id="1027" product-id="24593"/>
+ <usb-device vendor-id="0x0403" product-id="0x6001"/>
+ <usb-device vendor-id="0x0403" product-id="0x6010"/>
+ <usb-device vendor-id="0x0403" product-id="0x6011"/>
<!-- May be Aqualung custom PID? -->
- <usb-device vendor-id="1027" product-id="24597"/>
+ <usb-device vendor-id="0x0403" product-id="0x6015"/>
<!-- Oceanic Custom PID -->
- <usb-device vendor-id="1027" product-id="62560"/>
+ <usb-device vendor-id="0x0403" product-id="0xf460"/>
<!-- Suunto Custom PID -->
- <usb-device vendor-id="1027" product-id="63104"/>
+ <usb-device vendor-id="0x0403" product-id="0xf680"/>
<!-- Cressi (Leonardo) Custom PID -->
- <usb-device vendor-id="1027" product-id="34768"/>
+ <usb-device vendor-id="0x0403" product-id="0x87d0"/>
<!-- USB devices -->
<!-- EON Steel -->
- <usb-device vendor-id="5267" product-id="48"/>
+ <usb-device vendor-id="0x1493" product-id="0x30"/>
<!-- EON Steel core -->
- <usb-device vendor-id="5267" product-id="51"/>
+ <usb-device vendor-id="0x1493" product-id="0x33"/>
<!-- Scubapro G2 -->
- <usb-device vendor-id="11884" product-id="12801"/>
+ <usb-device vendor-id="0x2e6c" product-id="0x3201"/>
<!-- Scubapro Aladin Square -->
- <usb-device vendor-id="49745" product-id="8198"/>
+ <usb-device vendor-id="0xc251" product-id="0x2006"/>
<!-- Atomics Aquatics Cobalt -->
- <usb-device vendor-id="1137" product-id="2184"/>
+ <usb-device vendor-id="0x0471" product-id="0x0888"/>
</resources>
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 @@
<resources>
<!-- FTDI Chips -->
<!-- (Smart Interface), Heinrichs Weikamp -->
- <usb-device vendor-id="1027" product-id="24577"/>
- <usb-device vendor-id="1027" product-id="24592"/>
- <usb-device vendor-id="1027" product-id="24593"/>
+ <usb-device vendor-id="0x0403" product-id="0x6001"/>
+ <usb-device vendor-id="0x0403" product-id="0x6010"/>
+ <usb-device vendor-id="0x0403" product-id="0x6011"/>
<!-- May be Aqualung custom PID? -->
- <usb-device vendor-id="1027" product-id="24597"/>
+ <usb-device vendor-id="0x0403" product-id="0x6015"/>
<!-- Oceanic Custom PID -->
- <usb-device vendor-id="1027" product-id="62560"/>
+ <usb-device vendor-id="0x0403" product-id="0xf460"/>
<!-- Suunto Custom PID -->
- <usb-device vendor-id="1027" product-id="63104"/>
+ <usb-device vendor-id="0x0403" product-id="0xf680"/>
<!-- Cressi (Leonardo) Custom PID -->
- <usb-device vendor-id="1027" product-id="34768"/>
+ <usb-device vendor-id="0x0403" product-id="0x87d0"/>
<!-- USB devices -->
<!-- EON Steel -->
- <usb-device vendor-id="5267" product-id="48"/>
+ <usb-device vendor-id="0x1493" product-id="0x30"/>
<!-- EON Steel core -->
- <usb-device vendor-id="5267" product-id="51"/>
+ <usb-device vendor-id="0x1493" product-id="0x33"/>
<!-- Scubapro G2 -->
- <usb-device vendor-id="11884" product-id="12801"/>
+ <usb-device vendor-id="0x2e6c" product-id="0x3201"/>
<!-- Scubapro Aladin Square -->
- <usb-device vendor-id="49745" product-id="8198"/>
+ <usb-device vendor-id="0xc251" product-id="0x2006"/>
<!-- Atomics Aquatics Cobalt -->
- <usb-device vendor-id="1137" product-id="2184"/>
+ <usb-device vendor-id="0x0471" product-id="0x0888"/>
</resources>
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"))