deco code rewrite
Jef Driesen
jefdriesen at telenet.be
Thu Dec 6 04:42:15 PST 2012
On 2012-12-05 23:20, Jan Schubert wrote:
> I already proceeded with the Shearwater Predator, see attached
> screenshot.
> Not mentioning the "known issues" there is some other "interessting"
> things:
>
> - seems there are a lot (!) of events reported
> - seems there are at least some events taken false, there has been
> for
> sure no gaschange in this dive
That's my fault. The predator stores the active gas on each sample, and
generating the GASCHANGE2 event on each sample was the quick and easy
solution for the first version. But later on, I completely forgot about
that (or I was too concentrated on the new design, where the gaschange
event will be dropped in favor of an active gas sample) :-)
I'll fix this and only generate an event when the gas actually changes.
> - also pO2, pN2 and pHe are wrong
Currently only the OC gases are reported by libdivecomputer. I didn't
really know how to deal with this. At first, I just wanted to pick
either the OC or CC gas mixes, depending on the dive mode. But there is
no such setting in the header, only in the samples. Apparently the user
can switch from CC to OC during the dive (confirmed by Shearwater), so
this is going to be a bit more tricky. Maybe the easiest is to just
report both sets, until we have some better solution?
The percentages in the GASCHANGE2 event will always be correct, because
the percentages are directly stored in the sample data. The OC/CC gases
defined in the header are not used for the events.
PS: As I'm not a rebreather (or technical) diver, I can definitely use
some help in that area, to make sure libdivecomputer will also supports
those features that technical divers need.
Jef
More information about the subsurface
mailing list