Fix Weekly Summary Crash

Refactoring of WeeklySummary to use the metricDB (speed optimisation)
introduced a bug where the ridefile iterator was erroneously used
whilst computing daily averages. This patch fixes this by using the
daily iterator instead.

Many thanks to John Ehrlinger for identifying, reporting and helping
to diagnose this defect.
This commit is contained in:
Mark Liversedge
2011-04-09 08:20:06 +01:00
parent 010e27e50c
commit 53a8167787

View File

@@ -216,7 +216,7 @@ WeeklySummaryWindow::refresh()
// average RI for the day
if (dailyRides[day] > 1)
dailyRI[day] = ((dailyRI[day] * (dailyRides[i]-1))
dailyRI[day] = ((dailyRI[day] * (dailyRides[day]-1))
+ metrics.getForSymbol("skiba_relative_intensity")) / dailyRides[day];
else
dailyRI[day] = metrics.getForSymbol("skiba_relative_intensity");