6 Commits

Author SHA1 Message Date
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
Jef Driesen
ef2402eff5 Integrate the new I/O interface in the public api
Currently the dive computer backends are responsible for opening (and
closing) the underlying I/O stream internally. The consequence is that
each backend is hardwired to a specific transport type (e.g. serial,
irda or usbhid). In order to remove this dependency and support more
than one transport type in the same backend, the opening (and closing)
of the I/O stream is moved to the application.

The dc_device_open() function is modified to accept a pointer to the I/O
stream, instead of a string with the device node (which only makes sense
for serial communication). The dive computer backends only depend on the
common I/O interface.
2018-04-03 21:11:06 +02:00
Jef Driesen
469717a2a1 Add support for imperial units in the xml output.
Libdivecomputer always uses metric units internally. But when reverse
engineering a device that stores everything using imperial units, it's
very convenient to be able to switch the output to imperial units too.
2016-03-29 16:34:27 +02:00
Jef Driesen
e8b9e88171 Integrate the new output formats.
The existing output code is removed and replaced with the new XML and
RAW output formats. The desired output format can be selected with a new
command-line option. The XML format remains the default output format.
2016-02-26 08:24:11 +01:00
Jef Driesen
195c4c7a7e Add the download command. 2016-01-05 20:38:47 +01:00