54 Commits

Author SHA1 Message Date
Jef Driesen
ee8b4e36ad Merge branch 'release-0.3'
Integrate the bugfixes from the stable branch.
2013-05-13 23:49:37 +02:00
Jef Driesen
51d6074bfe Use a new xml element for the gaschange events.
The new xml element makes the the gaschange events stand out more
against the other less important events. At the same time it also
demonstrates the decoding of the packed oxygen and helium percentages.
2013-05-09 21:09:52 +02:00
Jef Driesen
b5f3e30de4 Add a root element to the xml output.
Without the root element the output isn't valid xml. Although the
output is supposed to provide a human readable representation for
internal use only, and thus never really intended for processing by
third-party applications, it doesn't hurt to turn it into valid xml
either.
2013-05-09 21:09:52 +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
7323ba0f2d Re-order the decostop array to match the enum values.
The enum values have been re-ordered a while ago, but the array was not
updated to reflect those changes.
2013-03-10 20:57:19 +01: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
56b7730773 Add a new vendor event.
The new vendor event provides a mechanism to deliver auxiliary data,
which is automatically retrieved during the data transfer, but not
accessible through the library interface otherwise. Possible examples
include handshake data and/or device identification data.

This event is mainly intended for diagnostic purposes, in combination
with the memory dumping support. Very few applications will actually
need it for anything else.
2012-12-27 12:10:45 +01:00
Jef Driesen
17efdaf1d8 Update the example application for the new sample types.
The example application is updated to support the new setpoint,
ppO2, CNS and decompression samples that have been introduced. The
NDL event is removed again.
2012-12-11 20:39:10 +01:00
Jef Driesen
500fb1e16b Add support for the Shearwater Predator. 2012-12-05 16:08:47 +01:00
Jef Driesen
d3de4bf9bd Update the example application for the new fields.
Update the example application to support the new salinity and
atmosperic pressure fields. Because the new fields are not supported by
all backends, they are only included in the output when available.
2012-12-01 14:20:12 +01:00
Dirk Hohndel
1d360d3a1e This adds support for a subset of the events the OSTC provides.
- PO2 warnings (high and low both mapped to the same SAMPLE_EVENT_PO2
  event)
- SPEED warning (which according to hw isn't emitted at this point)
- Deco stop violations (both deep and regular mapped to same
  SAMPLE_EVENT_CEILING event)
- Deco ceiling and time (this is reported as a series of
  SAMPLE_EVENT_DECOSTOP events with packed deco stop depth (in m) and
  time (in seconds)
  A SAMPLE_EVENT_NDL event (with an optional value indicating the non-stop
  time remaining) indicates that the ceiling has been resolved
- Gas change (reported as SAMPLE_EVENT_GASCHANGE2, using another
  unfortunate O2% / He% semantic that is used in the
  SAMPLE_EVENT_GASCHANGE
  This also covers the manual gas set event of the OSTC
- Manual Marker (reported as SAMPLE_EVENT_BOOKMARK)

The two new events (SAMPLE_EVENT_GASCHANGE2 and SAMPLE_EVENT_NDL are added
to the universal app as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-24 11:43:59 +01:00
Jef Driesen
af51b58a09 Use non-standard replacement functions for msvc. 2012-09-21 21:59:08 +02:00
Jef Driesen
dad451f6f9 Add a command line option to increase the loglevel.
By default, the universal application will always log error and warning
messages, but the loglevel can be increased to also log info 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
4296f974d0 Don't include unnecessary header files.
Due to the use of the convenience functions, the device specific header
files are no longer necessary, and can be replaced with the high-level
header files.
2012-08-27 23:02:44 +02:00
Jef Driesen
4bc477baa2 Update the examples to use the new convenience functions. 2012-06-21 21:42:37 +02:00
Jef Driesen
c821d40144 Introduce a namespace prefix for the high-level public api.
Adding the "dc_" namespace prefix (which is of course an abbreviation
for libdivecomputer) should avoid conflicts with other libraries. For
the time being, only the high-level device and parser layers are
changed.
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
Jef Driesen
e65025b501 Separate private and public headers.
The public header files are moved to a new subdirectory, to separate
the definition of the public interface from the actual implementation.
Using an identical directory layout as the final installation has the
advantage that the example code can be build outside the project tree
without any modifications to the #include statements.
2012-06-21 21:39:24 +02:00
Jef Driesen
52d8f08281 Enable the model hint to speedup the autodetection. 2012-05-23 21:45:46 +02:00
Jef Driesen
781f0db71f Add support for the Heinrichs Weikamp Frog. 2012-04-28 11:18:16 +02:00
Jef Driesen
48f6b1eec7 Add a command line parameter to specify the model code. 2011-12-31 07:52:07 +01:00
Jef Driesen
3d78282cde Rename the backend from darwinair to darwin.
The name change makes it more obvious the backend supports both the
Darwin and the Darwin Air, and it's a shorter name too.
2011-12-31 07:51:52 +01:00
Jef Driesen
ca56b5932a Add support for the Mares Darwin.
The Darwin and Darwin Air share a very similar layout, but with a few
differences here and there. Unfortunately, there seems to be no way to
autodetect the exact model during the download. Therefore, an extra
model parameter is added to select the appropriate model manually.
2011-12-31 07:47:43 +01:00
Jef Driesen
5ef0398c42 Add support for the Dacor Darwin Air. 2011-11-11 11:13:03 +01:00
Jef Driesen
f526cdd3d9 Add support for the Mares Icon HD Net Ready. 2011-09-24 13:49:18 +02:00
Jef Driesen
a10fc9d85e Move duplicated code into a common file. 2011-06-19 14:59:15 +02:00
Jef Driesen
4b887341f3 Add support for the Atomics Cobalt. 2011-03-12 10:31:32 +01:00
Jef Driesen
0d0c654b27 Use the new field api in the example application. 2011-01-13 23:41:55 +01:00
Jef Driesen
1ea4879066 Choose the samplerate based on the model number. 2011-01-13 22:12:45 +01:00
Jef Driesen
2fca7914b6 Implement the foreach and fingerprint support for the Zeagle N2iTiON3. 2010-08-28 22:53:55 +02:00
Jef Driesen
c060f268be Add support for the Zeagle N2iTiON3. 2010-08-28 22:53:48 +02:00
Jef Driesen
87226652df Fix the year offset for some models. 2010-08-09 17:05:01 +02:00
Jef Driesen
aca36ad344 Add a parser for the Mares Icon HD. 2010-06-29 11:42:00 +02:00
Jef Driesen
620775af25 Add support for the Mares Icon HD. 2010-04-12 10:19:38 +02:00
Jef Driesen
b92deee33c Support automatic fingerprint management using a cache directory. 2010-05-03 18:26:41 +00:00
Jef Driesen
6641dda617 Add a parser for the Cressi Edy. 2010-05-03 18:02:43 +00:00
Jef Driesen
fb9976d24f Add a parser for the Heinrichs Weikamp OSTC. 2010-04-19 13:53:38 +00:00
Jef Driesen
0faf2bf815 Use the correct printf format for 64 bit integers. 2010-04-02 13:04:53 +00:00
Jef Driesen
1e7a1b8194 Use the correct freedive mode for each model. 2010-02-26 14:41:25 +00:00
Jef Driesen
1983e2c008 Parse the dive data and output an xml file. 2010-02-16 14:57:52 +00:00
Jef Driesen
ba1bd5d688 Use the userdata parameter to pass the device data back to the caller. 2010-02-16 14:57:37 +00:00
Jef Driesen
ff55a4a82d Use the userdata parameter to pass the dive data to the callback. 2010-02-16 14:57:26 +00:00
Jef Driesen
f6d35fa2c2 Add cancellation support.
To be able to cancel an operation, an application should register a
callback function that returns a non-zero value whenever the active
operaton should be cancelled. A backend can invoke this callback function
to query the application for a pending cancellation request.
2010-02-15 13:16:26 +00:00
Jef Driesen
82a315ddc5 Add an option to provide fingerprint data. 2010-02-04 10:47:13 +00:00
Jef Driesen
4b590ba5e2 Pass the fingerprint data to the callback function. 2010-02-04 10:46:42 +00:00
Jef Driesen
fab15b19a7 Add a clock synchronization event. 2010-02-01 21:20:30 +00:00