From 6ca48b362156148776cffbf6ca2dd52b023cdfcb Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 20 Dec 2014 21:00:45 +0000 Subject: [PATCH] Get withings weight on same day as ride .. should have checked for date <= not < ride date. --- src/Athlete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Athlete.cpp b/src/Athlete.cpp index 5af82de01..447027b3b 100644 --- a/src/Athlete.cpp +++ b/src/Athlete.cpp @@ -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;