Planner: track gas used even if we don't have a real cylinder

We tracked gas used by simulating a dive with a cylinder - but for that we
need a cylinder size and working pressure. If the user just enters a gas
but no cylinder data (likely in order to figure out how much gas is used
so that she then can pick a big enough cylinder), we didn't show any gas
consumption.

It kinda sucks to add another member to the cylinder structure, but this
seemed far more reasonable then some other, global structure that
independently tracks gas usage. This just seemed to make sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-01 09:59:38 -07:00
parent f44a7509b3
commit 2a871d7fe5
3 changed files with 13 additions and 11 deletions

1
dive.h
View file

@ -60,6 +60,7 @@ typedef struct
pressure_t start, end, sample_start, sample_end;
depth_t depth;
bool used;
volume_t gas_used;
} cylinder_t;
typedef struct