diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-20 16:00:28 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-20 16:00:28 -0700 |
commit | 31b34a24cc890cb377952a7025a92725220e20a4 (patch) | |
tree | 5bf1f77fbc396617c7f3a401f7dbdf2780a486e7 /core/profile.c | |
parent | eb07faef00c98ddcca3d0035d23661a3c4f30448 (diff) | |
download | subsurface-31b34a24cc890cb377952a7025a92725220e20a4.tar.gz |
Don't calculate the 9 minute average
We don't do the "smoothed" profile anymore (and haven't for years),
so no need to calculate the data.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/core/profile.c b/core/profile.c index fe73ab47e..4e9ee88ee 100644 --- a/core/profile.c +++ b/core/profile.c @@ -207,8 +207,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index) struct plot_data *p = plot_entry; // moves with 'entry' int start = p->sec - HALF_INTERVAL, end = p->sec + HALF_INTERVAL; int min, max; - int firsttime, lasttime, lastdepth; - int depth_time_2; /* Go back 'seconds' in time */ while (entry_index > 0) { @@ -220,10 +218,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index) // indexes to the min/max entries min = max = entry_index; - // accumulated depth*time*2 - depth_time_2 = 0; - firsttime = lasttime = p->sec; - lastdepth = p->depth; /* Then go forward until we hit an entry past the time */ while (entry_index < pi->nr) { @@ -233,10 +227,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index) if (time > end) break; - depth_time_2 += (time - lasttime) * (depth + lastdepth); - lasttime = time; - lastdepth = depth; - if (depth < pi->entry[min].depth) min = entry_index; if (depth > pi->entry[max].depth) @@ -248,10 +238,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index) plot_entry->min = min; plot_entry->max = max; - if (firsttime == lasttime) - plot_entry->avg = pi->entry[min].depth; - else - plot_entry->avg = depth_time_2 / 2 / (lasttime - firsttime); } static velocity_t velocity(int speed) |