]> git.tdb.fi Git - ext/subsurface.git/commitdiff
If we don't have cylinder working pressure, we sill want to show the volume
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 9 Nov 2011 15:56:07 +0000 (07:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 9 Nov 2011 15:59:28 +0000 (07:59 -0800)
.. although in that case we can only ever show the volume in liters, and
cannot do a conversion to cubic feet even if the user has set imperial
units.

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

index c7a683b898a9a391547219bda9c1bba717f4e921..62183c0c17054dc51ae461ee7488dd0991dbaaea 100644 (file)
@@ -71,12 +71,12 @@ static int convert_volume_pressure(int ml, int mbar, double *v, double *p)
        int decimals = 1;
        double volume, pressure;
 
+       volume = ml / 1000.0;
        if (mbar) {
                if (output_units.volume == CUFT) {
                        volume = ml_to_cuft(ml);
                        volume *= bar_to_atm(mbar / 1000.0);
-               } else
-                       volume = ml / 1000.0;
+               }
 
                if (output_units.pressure == PSI) {
                        pressure = mbar_to_PSI(mbar);