diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-30 10:08:33 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-06 09:14:34 -0700 |
commit | 3aaf8b1f5af275f3b1d26ff7c21c6b47448d76c0 (patch) | |
tree | b2af74456c55e53750c8aae8671c0a244437d9ad /statistics.h | |
parent | d982096144f2f9d0ef9e230f82a30792cca05654 (diff) | |
download | subsurface-3aaf8b1f5af275f3b1d26ff7c21c6b47448d76c0.tar.gz |
Make gas use statistics be coherent and more complete
The gas use logic in the dive statistics page is confused.
The SAC case had a special case for "unknown", but only for
the first gas. Other gases had the normal empty case.
Also, the logic was really odd - if you had gases that weren't used (or
pressures not known) intermixed with gases you *did* have pressure for,
the statistics got really confused.
The list of gases showed all gases that we know about during the dive,
but then the gas use and SAC-rate lists wouldn't necessarily match,
because the loops that computed those stopped after the first gas that
didn't have any pressure change.
To make things worse, the first cylinder was special-cased again, so it
all lined up for the single-cylinder case.
This makes all the cylinders act the same way, leaving unknown gas use
(and thus SAC) just empty for that gas.
It also fixes the SAC calculation case where we don't have real samples,
and the profile is a fake profile - possibly with gas changes in between
the fake points. We now make the SAC calculations match what we show -
which is admittedly not at all necessarily what the dive was, but at
least we're consistent.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'statistics.h')
-rw-r--r-- | statistics.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/statistics.h b/statistics.h index e28fb8f55..4d14139e6 100644 --- a/statistics.h +++ b/statistics.h @@ -45,7 +45,6 @@ extern char *get_minutes(int seconds); extern void process_all_dives(struct dive *dive, struct dive **prev_dive); extern void get_selected_dives_text(char *buffer, int size); extern void get_gas_used(struct dive *dive, volume_t gases[MAX_CYLINDERS]); -extern char *get_gaslist(struct dive *dive); extern void process_selected_dives(void); void selected_dives_gas_parts(volume_t *o2_tot, volume_t *he_tot); |