Commit graph

9 commits

Author SHA1 Message Date
Linus Torvalds
66c04f4f47 Fix up the statistics page use of pressure data
The statistics page calculates air use separately, and also needs to be
fixed up for the split of the pressures into sample-vs-start/end.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-09 08:18:00 -08:00
Lubomir I. Ivanov
97f09f3ea8 don't use strftime() due to locale issues
Make statistics.c use snprintf() with weekday(), monthname() instead of
strftime().  The mingw strftime() ends up having lots of problems at
least on Windows unless you set the locale just right, so just avoid the
problem by doing the simple function by hand.  We already did that in
other places anyway.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-07 08:50:06 -08:00
Dirk Hohndel
93d07f631a Don't test for liquid Helium
Simply accept temperatures that are above absolute zero.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04 15:09:56 -07:00
Dirk Hohndel
d906c82f31 Clear O2/H2 field if there is no tank information
Found using the new test dives

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04 11:00:48 -07:00
Dirk Hohndel
0e64a22c14 Don't display a water temperature of absolute 0 in info/stats page
Found using the new test dives

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04 10:57:26 -07:00
Dirk Hohndel
a416847d3b Exclude obviously bogus SAC values from statistics calculations
Random cutoff is 2.8l/min (or about 0.1cuft/min)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02 15:31:41 -07:00
Dirk Hohndel
b9179aabd5 Fix typo that broke min SAC calculation
Actually more of a cut'n'paste-o

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02 13:30:49 -07:00
Dirk Hohndel
ba6c570831 Surface interval is calculated from the END of previous dive
Silly mistake

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02 13:27:25 -07:00
Dirk Hohndel
619ab9e828 Add Info & Stats page to the notebook
This provides the relevant information for the currently selected dive
plus a bunch of statistics over all dives in the dive_table.

The visual design has lots of room for improvement
- right now the different fields change size
- it might be nice to have a more modern look for the entries
- the O2/He field is odd - for most divers the He value will
  always be 0, so maybe we should only show He if there's at least one
  dive that uses He? Also, we simply do a comma separated list of gases
  for all the tanks used

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02 12:27:12 -07:00