The second gas change event (type 0x06) contains both the oxygen and
helium percentages. These are now reported correctly with the new
GASCHANGE2 event.
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>
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.
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.
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.
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.
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.
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.