27 Commits

Author SHA1 Message Date
Ryan Gardner
75f260a941 Add support for the Deep Six Excursion
Based on original work and code by Ryan Gardner, with some additional
improvements and integration into libdivecomputer by Jef Driesen.
2021-08-17 22:38:53 +02:00
Jef Driesen
2ccdc46561 Use the product name as the family name
The standard practice for the human-readable family name is to use the
product name and not vendor name.
2021-05-07 20:46:56 +02:00
Jef Driesen
6ef72ab420 Add support for the Sporasub SP2
The Sporasub SP2 uses a very simple communication protocol and memory
layout, but with some unusual aspects:

Dives are artifically limited to a maximum of 6000 samples.

Unlike all other dive computers, the dives are not stored in some kind
of ringbuffer structure. Once the memory is full, no new dives can be
recorded. The existing dives need to be erased first, and the dive
computer will start recording again at te start of the memory area. The
Sporasub application has an "Auto-clear watch memory after data
transfer" feature for this purpose.

I didn't implement a more efficient download algorithm because
downloading a full memory dumps takes less than 10 seconds.
2021-04-15 16:47:59 +02:00
Jef Driesen
5380b247af Update the example application
The application is now responsible for setting up the USB based I/O
stream.
2020-08-11 15:16:36 +02:00
Jef Driesen
71a149d776 Add support for Liquivision dive computers 2020-07-09 17:02:32 +02:00
David Carron
8d35ee6978 Add support for the McLean Extreme 2020-06-08 13:45:43 +02: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
3d394c9262 Don't use the USB VID/PID for opening the device
When two or more identical (or very similar) dive computers are
connected, the USB VID/PID can be ambiguous. That's because the VID/PID
identifies the type of the USB device, and not the individual device.
But each USB HID device descriptor returned by the device discovery
represents a single connected device, and thus guarantees to open the
correct USB device.

To obtain the same behaviour as before, an application can simply open
the first discovered device.
2018-04-03 22:02:15 +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
6b50e7f959 Set a default transport in the examples
Setting a default transport type avoids the need to explicitely set a
transport using the the new --transport command-line option. This also
preserves backwards compatibility with previous versions where the
option didn't exist yet.
2018-04-03 21:44:08 +02:00
Jef Driesen
c50958495d Update the example application
The dctool example application is updated to the latest changes:

 - The I/O stream is opened and closed by the application.

 - A new (mandatory) option is added to select the desired transport
   type. This is nessecary because several dive computers support
   multiple transport types now.
2018-04-03 21:44:08 +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
Jef Driesen
c8b2d89354 Set the default model number.
When the device family is provided without an explicit model number, we
simply choose the first available model. But since new models are being
added all the time, this default model is not guaranteed to remain the
same. That's not desirable because it can alter the behaviour of the
application.

The introduction of the Aeris 500AI is an example of this problem. The
default model in the vtpro family used to be the Oceanic Versa Pro. But
because the Aeris 500AI has a lower model number, it automatically
became the new default model. Since both use a different protocol
variant (MOD vs INTR) they are not interchangable.

The default model is now hardcoded. The best option is of course to
provide the model number explicitly!
2016-07-11 21:49:16 +02:00
John Van Ostrand
9a4e2b75a5 Add support for the Cochran Commander and EMC. 2016-03-22 20:09:45 +01:00
Jef Driesen
57a54f824c Add helper functions for converting hexadecimal data. 2016-01-04 19:50:51 +01:00
Jef Driesen
8f61648a39 Add helper functions for reading/writing binary files. 2016-01-04 19:50:51 +01:00
Jef Driesen
5188f5c25f Add a helper function for translating status codes. 2016-01-04 19:50:51 +01:00
Jef Driesen
655e9ad312 Add a default event handler. 2016-01-04 19:50:51 +01:00
Jef Driesen
f0e5edc50b Setup the device descriptor. 2016-01-04 19:50:51 +01:00
Jef Driesen
b5503e53fd Add a more modular example application.
The universal application works well, but is quite difficult to extend
with more functionality. Therefore a new and more modular application is
needed. The new dctool application will support multiple sub-commands,
to carry out specific actions. Extending the application will be as easy
as adding new commands.
2016-01-04 19:50:51 +01:00
Jef Driesen
55c16d0d0f Adjust the default logformat.
The file, line and function information is now only printed for error
and debug messages.
2012-09-15 13:54:48 +02:00
Jef Driesen
866e636e8c Move the logging code to the examples.
With the application defined logging function, the actual logging is not
performed by the library anymore, and the code belongs in the
applications.
2012-08-27 23:08:38 +02:00
Jef Driesen
53e9d72a40 Integrate the context object in the library.
The public api is changed to require a context object for all
operations. Because other library objects store the context pointer
internally, only the constructor functions need an explicit context
object as a parameter.
2012-08-27 23:08:38 +02:00
Jef Driesen
9136a52835 Use common status codes for the device and parser layers. 2012-06-21 21:42:34 +02:00
Jef Driesen
a10fc9d85e Move duplicated code into a common file. 2011-06-19 14:59:15 +02:00