DataFilter - Metric aggretation honors AggregateZero and Count

When computing metric averages
This commit is contained in:
Alejandro Martinez
2023-01-16 12:52:27 -03:00
parent c65f313de5
commit bfa4b4b977
2 changed files with 6 additions and 4 deletions

View File

@@ -607,7 +607,7 @@ RideCache::getAggregate(QString name, Specification spec, bool useMetricUnits, b
// get this value
double value = item->getForSymbol(name);
double count = item->getForSymbol("workout_time"); // for averaging
double count = item->getCountForSymbol(name); // for averaging
// check values are bounded, just in case
if (std::isnan(value) || std::isinf(value)) value = 0;