mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Get withings weight on same day as ride
.. should have checked for date <= not < ride date.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user