Get withings weight on same day as ride

.. should have checked for date <= not < ride date.
This commit is contained in:
Mark Liversedge
2014-12-20 21:00:45 +00:00
parent 16fa4017d3
commit 6ca48b3621

View File

@@ -512,7 +512,7 @@ Athlete::getWithingsWeight(QDate date)
double lastWeight=0.0f;
foreach(WithingsReading x, withings_) {
if (x.when.date() < date) lastWeight = x.weightkg;
if (x.when.date() <= date) lastWeight = x.weightkg;
if (x.when.date() > date) break;
}
return lastWeight;