Merge pull request #2729 from dlvoy/fix-wearos-prediction-sgv-mmol

[2.6.7] Send correct SGV prediction data to WearOS when mmol/L is used
This commit is contained in:
Milos Kozak 2020-06-17 19:25:30 +02:00 committed by GitHub
commit 4a46dce74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -536,9 +536,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
List<BgReading> predArray = finalLastRun.getConstraintsProcessed().getPredictions();
if (!predArray.isEmpty()) {
final String units = profileFunction.getUnits();
for (BgReading bg : predArray) {
if (bg.value < 40) continue;
predictions.add(predictionMap(bg.date, bg.value, bg.getPredectionColor()));
predictions.add(predictionMap(bg.date, bg.valueToUnits(units), bg.getPredectionColor()));
}
}
}