Sanitize and fix cylinder pressure overview

Doing per-dive cylinder start/end pressures is insane, when we can have
up to eight cylinders.  The cylinder start/end pressure cannot be per
dive, it needs to be per cylinder.

This makes the save format cleaner too, we have all the cylinder data in
just one place.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2011-09-05 09:12:54 -07:00
parent 0f832f15d1
commit 5f79a804b9
5 changed files with 40 additions and 29 deletions

2
dive.h
View file

@ -81,6 +81,7 @@ typedef struct {
typedef struct {
cylinder_type_t type;
gasmix_t gasmix;
pressure_t start, end;
} cylinder_t;
static inline int to_feet(depth_t depth)
@ -118,7 +119,6 @@ struct dive {
duration_t duration, surfacetime;
depth_t visibility;
temperature_t airtemp, watertemp;
pressure_t beginning_pressure, end_pressure;
cylinder_t cylinder[MAX_CYLINDERS];
int samples;
struct sample sample[];