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:
commit
4a46dce74e
|
@ -536,9 +536,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
||||||
List<BgReading> predArray = finalLastRun.getConstraintsProcessed().getPredictions();
|
List<BgReading> predArray = finalLastRun.getConstraintsProcessed().getPredictions();
|
||||||
|
|
||||||
if (!predArray.isEmpty()) {
|
if (!predArray.isEmpty()) {
|
||||||
|
final String units = profileFunction.getUnits();
|
||||||
for (BgReading bg : predArray) {
|
for (BgReading bg : predArray) {
|
||||||
if (bg.value < 40) continue;
|
if (bg.value < 40) continue;
|
||||||
predictions.add(predictionMap(bg.date, bg.value, bg.getPredectionColor()));
|
predictions.add(predictionMap(bg.date, bg.valueToUnits(units), bg.getPredectionColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue