[PATCH] Air isn't special

Dirk Hohndel dirk at hohndel.org
Sun Jun 1 07:54:36 PDT 2014

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.

Sadly, NAK.


More information about the subsurface mailing list