summaryrefslogtreecommitdiffstats
path: root/statistics.c
AgeCommit message (Collapse)Author
2011-11-09Fix up the statistics page use of pressure dataGravatar Linus Torvalds
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-07don't use strftime() due to locale issuesGravatar Lubomir I. Ivanov
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-04Don't test for liquid HeliumGravatar Dirk Hohndel
Simply accept temperatures that are above absolute zero. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04Clear O2/H2 field if there is no tank informationGravatar Dirk Hohndel
Found using the new test dives Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04Don't display a water temperature of absolute 0 in info/stats pageGravatar Dirk Hohndel
Found using the new test dives Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02Exclude obviously bogus SAC values from statistics calculationsGravatar Dirk Hohndel
Random cutoff is 2.8l/min (or about 0.1cuft/min) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02Fix typo that broke min SAC calculationGravatar Dirk Hohndel
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-02Surface interval is calculated from the END of previous diveGravatar Dirk Hohndel
Silly mistake Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-02Add Info & Stats page to the notebookGravatar Dirk Hohndel
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>