[PATCH] Air isn't special

Henrik Brautaset Aronsen subsurface at henrik.synth.no
Sun Jun 1 08:48:20 PDT 2014


Dirk Hohndel wrote:
> On Sun, Jun 01, 2014 at 01:28:58PM +0200, subsurface at henrik.synth.no wrote:
>> From: Henrik Brautaset Aronsen<subsurface at henrik.synth.no>
>>
>> The notion that air is special is a weird one.  It clutters our code
>> base with special handling whenever o2 == 0 means AIR.  (All my rec
>> dives are with EAN32.  Why can't that be special instead? ;)
>>
>> The only reason I see to treat air special is to leave out o2=21.0
>> in the dive log xml.  So let's do it there instead (not included here).
>
> So I applied your patch and played with it to see if we could do this, but
> it breaks things in some rather unexpected ways...
>
> As we fixup the dive and sanitize the gasmix, you know turn every tank
> with no data into a tank with data - it's no longer all 0s, there's
> o2=209. Which breaks our code in various ways.
>
> So I'm not against making this "0 is air" notion disappear. But it's not
> as easy as your patch.


Yeah, I figured it would break somehow.  I guess we should just do the 
"0 is air" thingie as we read/parse the divelog, and nowhere else.

Henrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140601/fce95c85/attachment.html>


More information about the subsurface mailing list