Skip predictions below 40.

This commit is contained in:
Johannes Mockenhaupt 2018-05-01 18:18:06 +02:00
parent 1e80ca22c6
commit af563474d5
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -77,7 +77,10 @@ public class GraphData {
}
if (predictions != null) {
Collections.sort(predictions, (o1, o2) -> Double.compare(o1.getX(), o2.getX()));
bgListArray.addAll(predictions);
for (BgReading prediction : predictions) {
if (prediction.value >= 40)
bgListArray.add(prediction);
}
}
maxBgValue = Profile.fromMgdlToUnits(maxBgValue, units);