Don't save cylinder start/end pressures unless set by hand

Keep the sample pressure start/end data separate from the overall
cylinder start/end data - and clean the overall cylinder start/end data
if it matches the samples exactly to avoid the redundancy.

This breaks all the SAC calculations etc, which expect the cylinder
pressures to always be in the cylinder data.  I'll fix that up
separately.

The reason for this is that we really want to keep the manually entered
data separate: the pressure plotting doesn't need the confusion, and
considers end-point data (with interpolation) very different from sample
data.  Also, we do not want to pollute the xml save-file with data that
is computed.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2011-11-09 07:37:25 -08:00
parent 2b26b6433f
commit 0089dd8819
2 changed files with 14 additions and 36 deletions

2
dive.h
View file

@ -84,7 +84,7 @@ typedef struct {
typedef struct {
cylinder_type_t type;
struct gasmix gasmix;
pressure_t start, end;
pressure_t start, end, sample_start, sample_end;
} cylinder_t;
extern int get_pressure_units(unsigned int mb, const char **units);