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>
This commit is contained in:
Linus Torvalds 2016-04-20 15:12:53 -07:00 committed by Dirk Hohndel
parent d7103f97f7
commit e0ac1c9a26
3 changed files with 61 additions and 36 deletions

View file

@ -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;