]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Add capability of custom sorts to divelist columns
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Dec 2011 22:38:58 +0000 (14:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Dec 2011 22:38:58 +0000 (14:38 -0800)
.. and use this for the nitrox column, which can now be more complex
than just a single number.

The rule for the "nitrox" column is now:

 - we look up the highest Oxygen and Helium mix for the dive

   (Note: we look them up independently, so if you have a EAN50 deco
   bottle, and a 20% Helium low-oxygen bottle for the deep portion, then
   we'll consider the dive to be a "50% Oxygen, 20% Helium" dive, even
   though you obviously never used that combination at the same time)

 - we sort by Helium first, Oxygen second.  So a dive with a 10% Helium
   mix is considered to be "stronger" than a 50% Nitrox mix.

 - If Helium is non-zero, we show "O2/He", otherwise we show just "O2"
   (or "air").  So "21/20" means "21% oxygen, 20% Helium", while "40"
   means "Ean 40".

 - I got rid of the decimals.  We save them, and you can see them in the
   dive equipment details, but for the dive list we just use rounded
   percentages.

Let's see how many bugs I introduced.  I don't actually have any trimix
dives, but I edited a few for (very limited) testing.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found