Changeset 58173d7 in subsurface


Ignore:
Timestamp:
Jan 25, 2015, 7:23:27 AM (3 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.4-branch, v4.5-branch
Children:
d57ffa8
Parents:
6b3e361
git-author:
Anton Lundin <glance@…> (01/25/15 03:28:06)
git-committer:
Dirk Hohndel <dirk@…> (01/25/15 07:23:27)
Message:

Have get_dive_gas return air when without cylinders

If we called get_dive_gas on a dive without cylinders, we returned 100%,
which is quite wrong. This makes us return air as default gas instead.

Signed-off-by: Anton Lundin <glance@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • divelist.c

    r37830bd r58173d7  
    135135        }
    136136        /* All air? Show/sort as "air"/zero */
    137         if (!maxhe && maxo2 == O2_IN_AIR && mino2 == maxo2)
     137        if ((!maxhe && maxo2 == O2_IN_AIR && mino2 == maxo2) ||
     138                        (maxo2 == -1 && maxhe == -1 && mino2 == 1000))
    138139                maxo2 = mino2 = 0;
    139140        *o2_p = mino2;
Note: See TracChangeset for help on using the changeset viewer.