31 Commits

Author SHA1 Message Date
Jef Driesen
af1ca93fe8 Add support for trimix gas changes.
The second gas change event (type 0x06) contains both the oxygen and
helium percentages. These are now reported correctly with the new
GASCHANGE2 event.
2013-01-03 21:35:13 +01:00
Dirk Hohndel
89d731bc69 Add deco sample support for Suunto d9 based devices
The D9 family has begin and end of the deco event and we can therefore
convert this to the deco sample. For compatibility with existing software
we keep the events around.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-03 21:35:13 +01:00
Jef Driesen
2f8ec75c7c Merge branch 'release-0.1'
Integrate the bugfixes from the stable branch.
2012-09-21 21:24:04 +02:00
Jef Driesen
4df5e49008 Take the gas model into account to parse the gas mixes.
When the gas model setting is set to air, the individual gas mix
definitions retain their previous (non-air) values. This is convenient
to avoid having to adjust the gas mixes again on your next nitrox or
mixed gas dive. But the consequence is that for air dives, the gas model
should take precedence over the individual gas mix definitions, and a
single mix with air is returned instead.
2012-09-21 20:52:02 +02:00
Jef Driesen
136f1d1fe1 Fix the gas mix parsing.
The Suunto D9tx stores the gas mix definitions at a different offset
compared to the D4i and D6i.
2012-09-21 20:48:44 +02:00
Jef Driesen
cd31ff9dff Properly store the context pointer internally.
I forgot to update the device and parser initialization functions to
store the context pointer into the objects. As a result, the internal
context pointers were always NULL.
2012-08-28 08:44:47 +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
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
d6de181662 Update the parser to support the Suunto D4i, D6i and D9tx. 2011-08-12 22:47:40 +02:00
Jef Driesen
533e033b88 Use the sample configuration data to parse the sample data.
The sample configuration data describes which sample data is available
and how it is stored. Using this data should be more reliable than using
a hardcoded configuration.
2011-08-12 22:47:40 +02:00
Jef Driesen
417e7b3894 Use symbolic constants for the model numbers. 2011-03-19 23:07:17 +01:00
Jef Driesen
8c947bd6f7 Fix the parsing of HelO2 dives lacking the additional 12 byte block. 2011-03-19 22:57:10 +01:00
Jef Driesen
014f7aa420 Implement the new field api for the Suunto devices. 2011-01-13 22:14:53 +01:00
Jef Driesen
90e60fecee Add a new function to the public api to retrieve the dive metadata. 2011-01-13 22:14:53 +01:00
Jef Driesen
154f767a9c Convert assertions into error codes. 2011-01-08 23:40:15 +01:00
Jef Driesen
3d1a29e912 Fix the decoding of negative temperatures. 2010-03-15 15:43:11 +00:00
Jef Driesen
322577ab8c Fix the divisor for the compass headings. 2010-03-15 11:07:54 +00:00
Jef Driesen
6f622030eb Add some more HelO2 events. 2010-02-26 14:38:54 +00:00
Jef Driesen
10edb943ff Fix the HelO2 fingerprint, datetime and sample interval offsets. 2010-02-23 13:43:57 +00:00
Jef Driesen
a8116a0aec Add datetime support to the parsers. 2010-02-02 15:04:46 +00:00
Jef Driesen
c4931623b6 Add support for the Suunto HelO2. 2010-01-07 14:54:57 +00:00
Jef Driesen
b5bc493e0b Reduce the number of hardcoded offsets. 2010-01-07 14:54:38 +00:00
Jef Driesen
a4247b7505 Define the WARNING macro only once. 2009-08-06 14:15:52 +00:00
Jef Driesen
4c37c9c85f Add support for the Suunto Vyper Air and Cobra 3 to the parser. 2009-05-11 13:20:58 +00:00
Jef Driesen
ce705f8244 Use the new byte order functions everywhere. 2009-03-11 10:18:28 +00:00
Jef Driesen
23ea0d5e18 Added some explicit casts to be able to build with a C++ compiler. 2008-12-04 15:09:54 +00:00
Jef Driesen
7d9ffdc3f8 New method to detect the presence (or absence) of pressure samples.
The previous method failed for some dives.
2008-11-04 11:41:10 +00:00
Jef Driesen
1a36118671 Added a parser for the Suunto D9 and Vyper2. 2008-10-31 14:04:44 +00:00