Fix prediction data sent to WearOS by properly reacalculating them into current app unit
This commit is contained in:
parent
eabb75e20e
commit
7f62450d99
|
@ -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