30 Commits

Author SHA1 Message Date
Linus Torvalds
3c1e763a47 Merge git://github.com/libdivecomputer/libdivecomputer into Subsurface-DS9
Merge upstream changes by Jef Driesen:

 - add support for Liquivision dive computers

 - add support for the Aqualung i470TC

 - extract out Atomic Aquatics Cobalt USB support as a iostream

 - misc fixes

* git://github.com/libdivecomputer/libdivecomputer:
  Fix the OSTC4 firmware upgrade
  Handle a negative number of bytes as an error
  Update the example application
  Use the new USB transport for the Atomic Aquatics Cobalt
  Add an I/O implementation for USB communication
  Add support for filter parameters
  Disable direct access to the filter function
  Increase the receive timeout to 5 seconds
  Fix the McLean Extreme bluetooth name
  Add support for Liquivision dive computers
  Add support for the Aqualung i470TC
2020-08-20 12:36:38 -07:00
Jef Driesen
71a149d776 Add support for Liquivision dive computers 2020-07-09 17:02:32 +02:00
Linus Torvalds
6935fe717a Merge branch 'Oceans-S1' into Subsurface-DS9
Add initial support for the Oceans S1.

This expands a bit on the generic functions for the field-cache code,
and uses that to then add a fairly minimal Oceans S1 downloader.

And while it's minimal, it downloads about everything the S1 offers,
which is mainly just depth and temperature.

There are a few fields that it currently doesn't use, notably the
events and NDL information that the dive computer presumably reports in
the auxiliary data that comes in the sample, but without documentation
and more testing I'm not comfortable parsing that.

There's also some "current dive computer state" that isn't imported,
like the battery status.  I know how to read it, but it's not per-dive
data that could be added as extra fields: it's literally just the
current dive computer battery state at the time of the download.

The Oceans team said they'll provide more information about the
download, so this might be expanded in the future, but it seems fairly
usable even in this form.

Thanks to Dhaval Giani for sending me his Oceans S1 as a loaner, and to
Seth Garrison for doing the initial BLE packet dumps that made me think
it was fairly easily doable.

* Oceans-S1:
  Oceans S1: polish up the downloading logic for usability
  Oceans S1: actually download all dives and parse them
  Oceans S1: fill out core download protocol details
  Oceans S1: start filling in protocol details
  Oceans S1: start documenting the download format and first packets
  Add skeleton for Oceans S1 downloader
  Add generic dc_field_get() helper
2020-06-25 11:33:12 -07:00
Linus Torvalds
6b22340ddc Merge git://github.com/libdivecomputer/libdivecomputer into Subsurface-DS9
Merge upstream libdivecomputer updates from Jef Driesen:

 - Jef merged the EON Steel dive sorting fix we had in our branch: one
   less difference to upstream

 - Jef merged the McLean Extreme support with some updates and cleanups,
   this just takes all his changes.

 - manual pages for iostream

 - various minor fixes and updates from Jef

* git://github.com/libdivecomputer/libdivecomputer:
  Update the gitignore file
  Update the man pages for the new iostream functions
  Purge the serial port buffer during initialization
  Add support for the McLean Extreme
  Suunto Eon Steel: sort the dive list properly
  Remove the salinity compensation
  Fix the hwOS ppO2 bug for firmware v3.08
2020-06-25 11:24:00 -07:00
Linus Torvalds
d58b8f6928 Add skeleton for Oceans S1 downloader
This does nothing, but fills in all the basic boiler plate code and data
structures.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-23 13:28:10 -07:00
David Carron
8d35ee6978 Add support for the McLean Extreme 2020-06-08 13:45:43 +02:00
David Carron
ee84202b2b Add support for the McLean Extreme dive computer
Initial support for McLean Extreme

Signed-off by: David McLean Carron <david_de_carron@hotmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-18 09:52:17 -07:00
Linus Torvalds
8594445088 Add support for the Deepblu Cosmiq+ dive computer
Somewhat basic support, but the data the Deepblu Cosmiq+ reports is
pretty basic.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-07 15:05:37 -07:00
Linus Torvalds
4e9e94d9f8 Add backend for Garmin Descent Mk1
This uses pretty much all of our new infrastructure: the USB storage
iostream for the actual IO, the field-cache for the divecomputer fields,
and the string interface for the events.

It's also a very fast downloader.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-07 15:05:37 -07:00
Linus Torvalds
99c2ca7205 Add 'usbstorage' iostream
This ends up being just a file interface for dive computers that expose
their data as a filesystem that can be mounted.

Right now that's only the Garmin Descent Mk1, although technically the
Uemis Zurich also did that (but oddly, and the backend was never merged
into libdivecomputer).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-07 15:05:37 -07:00
Jef Driesen
e363e5b1fd Add support for the Cressi Goa and Cartesio 2019-01-14 21:14:30 +01:00
Jef Driesen
472e9e984c Add support for the Tecdiving DiveComputer.eu 2018-06-22 23:24:30 +02:00
Jef Driesen
8aef4a49a0 Unify the Uwatec Smart, Meridian and G2 backends
The Uwatec Smart, Meridian and G2 backends are almost identical, except
for the low-level packet sending and receiving code. With the new I/O
layer, those three backends can easily be unified in a single backend.

The Meridian and G2 are completely removed, only the family types are
kept for backwards compatibility.
2018-06-22 23:13:44 +02:00
Jef Driesen
a7d0033bae Add a Bluetooth Low Energy (BLE) transport type
Libdivecomputer doesn't have built-in support for BLE communication yet,
so this is mainly for future use and custom I/O implementations.
2018-04-03 21:52:20 +02:00
Jef Driesen
eed993fd16 Add support for multiple transports per device
Several dive computers support multiple transports. For example the
Suunto Eon Steel supports both USB HID and BLE. All devices using
bluetooth classic communication support both the native bluetooth
transport and the legacy serial port emulation.

To support this feature, the values of the dc_transport_t type are
changed into bitmasks, and the dc_descriptor_t struct is extended with a
bitfield with all the supported transports.
2018-04-03 21:11:06 +02:00
Jef Driesen
3230387fff Add the transport type to the I/O stream
Add a function to query the underlying transport type. This allows the
dive computer backends to implement transport specific behaviour where
necessary.

For the built-in I/O implementations, the transport type is obviously
always hardcoded, but for a custom I/O implementation the application
needs to provide the correct type. Hence the transport type can't be
hardcoded in the vtable and needs to be passed as a parameter.
2018-04-03 21:11:06 +02:00
Linus Torvalds
f107d7c0d8 Add initial Scubapro G2 frontend
The back-end parser seems to be the same as for the Uwatec Smart (aka
Galileo Sol).  At least that's the assumption right now.

The downloader just uses USB HID (very similar to EON Steel) rather than
the horrible IrDA thing.

There's also eventually a BLE thing, but that's for the future.

This is an unholy mixture of the Uwatec Smart downloader logic and the
EON Steel usbhid transfer code.  The back-end is pure Uwatec Smart
(model 0x11, same as Galileo Sol).

I'm not at all sure this gets everything right, but it downloads
*something*.

[Jef Driesen: Renamed the backend to uwatec, and made some smaller
              cosmetic changes to match the existing coding style.]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-06-28 15:32:39 +02:00
John Van Ostrand
9a4e2b75a5 Add support for the Cochran Commander and EMC. 2016-03-22 20:09:45 +01:00
Jef Driesen
87e6940572 Add support for the DiveSystem iDive and Orca. 2014-12-29 10:09:34 +01:00
Jef Driesen
598377ec44 Add support for the Citizen Hyper Aqualand. 2014-11-30 15:30:16 +01:00
Linus Torvalds
5c967f3382 Suunto EON Steel: support downloading of core dive profile data
Basic Suunto EON Steel downloading copied from my test application.
This parses all the core dive data, including sample data (time, depth,
cylinder pressure, deco information etc).

The deco information returns ceiling and TTS rather than ceiling and
"time at ceiling", because that's what the dive computer has, and I
don't see any other way to return the information.

We don't report any events yet, though.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-11-24 11:37:23 +01:00
Jef Driesen
3f7af8c349 Add support for the Dive Rite NiTek Q. 2014-02-06 09:42:06 +01:00
Jef Driesen
c524986175 Add support for the Scubapro/Uwatec Meridian.
The Uwatec Meridian protocol is identical to the Uwatec Smart/Galileo
protocol, except for some additional framing around each data packet,
and the switch from IrDA to usb-serial communication. For parsing, the
data format appears to be identical to the Galileo data format.
2013-10-19 10:11:15 +02:00
Jef Driesen
b36ed311c5 Add support for the Heinrichs Weikamp OSTC3.
Although the communication protocol of the OSTC3 is nearly identical to
that of the Frog, the different size parameters make it hard to share
the code easily. On top of that, if we ever implement native bluetooth
communication support, we'll need a completely separate backend anyway.
Therefore the Frog backend is simply duplicated, with a few OSTC3
specific changes applied here and there.

The existing ostc parser is upgraded to support the new OSTC3 data
format.
2013-05-07 22:15:53 +02:00
Jef Driesen
4b541d124f Add support for the native Shearwater Petrel protocol.
The Petrel (with updated firmware) supports an enhanced communication
protocol, which is more efficient and powerfull than the legacy Predator
compatibility mode. The new protocol uses data compression for faster
transfers and supports the ability to selectively download individual
dives. Last but not least, the new protocol isn't limited to the last
128kB of logbook data, but can access the full logbook capacity (16MB).
2013-04-19 21:31:28 +02:00
Jef Driesen
0b20855d56 Add support for the Cressi Leonardo.
This is only a preliminary version. There is certainly some room for
improvement, but the basic functionality is already in place. That
should be sufficient for daily use, and possibles issues can always be
fixed when discovered.
2013-02-04 17:20:23 +01:00
Jef Driesen
500fb1e16b Add support for the Shearwater Predator. 2012-12-05 16:08:47 +01:00
Jef Driesen
fbe712fc8f Add a generic iterator interface. 2012-06-21 21:42:37 +02:00
Jef Driesen
163d383332 Use a common backend type for the device and parser layers. 2012-06-21 21:42:37 +02:00
Jef Driesen
9136a52835 Use common status codes for the device and parser layers. 2012-06-21 21:42:34 +02:00