aboutsummaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2019-08-24 14:10:25 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-24 15:02:50 -0700
commitd570cb789f4960b890b045a1512b0350dad5a795 (patch)
tree585074302f0019dc9556dc9f3a1b670e5ad31cd7 /core/btdiscovery.cpp
parent6cb0de406087ac5fc546ecc80d60add8fa6a480c (diff)
downloadsubsurface-d570cb789f4960b890b045a1512b0350dad5a795.tar.gz
Update libdivecomputer to support the Aqualung i200c
I got confirmation from Tiago Thedim Dias that my libdivecomputer patch makes BLE downloading work from the i200c, and already pushed out the libdivecomputer changes earlier. This updates the subproject in subsurface to have those changes. This also adds the bluetooth name patterns for the i300c and a few other Aqualung dive computers we hadn't added yet. That should make them show up in the bleutooth device list even without having to check the "Show all bluetooth devices" check-box. Tiago claims he didn't need that, and I wonder if we have some overly permissive match somewhere, but it's the right thing to do regardless. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index 175ecf932..8db1e02cc 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -78,11 +78,30 @@ static dc_descriptor_t *getDeviceType(QString btName)
product = "Quad";
}
+ // The Pelagic dive computers (generally branded as Oceanic or Aqualung)
+ // show up with a two-byte model code followed by six bytes of serial
+ // number. The model code matches the hex model (so "FQ" is 0x4651,
+ // where 'F' is 46h and 'Q' is 51h in ASCII).
+ if (btName.contains(QRegularExpression("^FI\\d{6}$"))) {
+ vendor = "Aqualung";
+ product = "i200c";
+ }
+
+ if (btName.contains(QRegularExpression("^FH\\d{6}$"))) {
+ vendor = "Aqualung";
+ product = "i300c";
+ }
+
if (btName.contains(QRegularExpression("^FQ\\d{6}$"))) {
vendor = "Aqualung";
product = "i770R";
}
+ if (btName.contains(QRegularExpression("^FR\\d{6}$"))) {
+ vendor = "Aqualung";
+ product = "i550c";
+ }
+
if (btName.contains(QRegularExpression("^ER\\d{6}$"))) {
vendor = "Oceanic";
product = "Pro Plus X";
@@ -93,6 +112,8 @@ static dc_descriptor_t *getDeviceType(QString btName)
product = "Geo 4.0";
}
+ // The Ratio bluetooth name looks like the Pelagic ones,
+ // but that seems to be just happenstance.
if (btName.contains(QRegularExpression("^DS\\d{6}"))) {
vendor = "Ratio";
product = "iX3M GPS Easy"; // we don't know which of the GPS models, so set one