summaryrefslogtreecommitdiffstats
path: root/core/profile.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2016-04-20 15:12:53 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-20 15:36:25 -0700
commite0ac1c9a26c6f82a42dea3d25bd0c8bd2a68ceb6 (patch)
tree2fa7fa8677d41b8d1e285a079839d5f7abab4f4c /core/profile.h
parentd7103f97f70417476468608b1535758dd4b344b7 (diff)
downloadsubsurface-e0ac1c9a26c6f82a42dea3d25bd0c8bd2a68ceb6.tar.gz
Fix 3-, 6- and 9-minute min/max calculations
Make them use indices into the plot-info, fix calculation of average depth, and fix and add comments. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/profile.h')
-rw-r--r--core/profile.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/profile.h b/core/profile.h
index abac9dd49..21cc263b7 100644
--- a/core/profile.h
+++ b/core/profile.h
@@ -50,9 +50,9 @@ struct plot_data {
double mod, ead, end, eadd;
velocity_t velocity;
int speed;
- struct plot_data *min[3];
- struct plot_data *max[3];
- int avg[3];
+ // stats over 3, 6, 9 minute windows:
+ int min[3], max[3]; // indices into pi->entry[]
+ int avg[3]; // actual depth average
/* values calculated by us */
unsigned int in_deco_calc : 1;
int ndl_calc;