[PATCH] Survive CCR dive logs w/o marked DILUENT/OXYGEN cylinders

Robert C. Helling helling at atdotde.de
Sun Nov 23 10:46:32 PST 2014


On 23 Nov 2014, at 01:22, Dirk Hohndel <dirk at hohndel.org> wrote:

Dirk,

> Look at the line RIGHT before the first inserted line... I'll move your
> code one line higher :-)

Argh. It’s not good to do these things when tired and a rush.

> Regarding your question if we can simply return from
> fill_missing_tank_pressures() if there is no O2 cylinder... I think we
> should. I actually wonder if we shouldn't have a test way higher up in the
> stack that says something like "if this is a CCR dive and we don't have a
> diluent cylinder and an O2 cylinder, something is seriously messed up...

I think it is fine not having those cylinders defined, like it is fine to have an OC dive with no cylinder information at all (in which case we assume to breath air and don’t attempt to plot cylinder pressures). 

Similarly, I would assume air as diluent in an unspecified amount and some O2 cylinder (again without gas usage calculation). I had seriously considered to make all arrays of size MAX_CYLINDERS one bigger and reserve cylinder[MAX_CYLINDERS] as a secret default O2 cylinder for CCR dives or return MAX_CYLINDERS rather than -1 so all code could simply work without error check. That option would have been better than calling a random used/defined cylinder O2 but I don’t think it would have bought us anything than confusion.

Best
Robert
 
--                                                                              
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO 
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics  
                      Scientific Coordinator                                   
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik    
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339       
    stupid .sig\n";   http://www.atdotde.de 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141123/e53fac10/attachment.sig>


More information about the subsurface mailing list