This started out yesterday with me looking at dives/test20.xml and saw
that the gasname text in the info box is wrong there. It uses the
gaschange event data via get_gasmix_from_event and then on to gasname.

The problem with using the result from get_gasmix_from_event is that it
doesn't care about the difference between SAMPLE_EVENT_GASCHANGE and
SAMPLE_EVENT_GASCHANGE2, and thus doesn't map the gaschange event to the
cylinder its changing to.

I dug around and found the same type of assumption in lots of places
allover the code. A while back pre 4.0 somewhere i fixed up
get_cylinder_index to do the right thing and switched all the places to
using it, but now we have reverted to using event data again.


Should we stop supporting SAMPLE_EVENT_GASCHANGE and converting
everything into actually relying on having the exact correct gas in the
event?

The other option is to stop looking at whats in the event and start only
looking at what gas is mapped to different times in the dive. We can't
do both, and mix and match them.

//Anton

-- 
Anton Lundin    +46702-161604
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to