diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java index 372afdc9e9..e6bfa76dfd 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java @@ -459,7 +459,7 @@ public class WatchUpdaterService extends WearableListenerService implements List treatments = MainApp.getConfigBuilder().getTreatmentsFromHistory(); for (Treatment treatment:treatments) { if(treatment.date > startTimeWindow){ - boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB)); + boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB, treatment.isValid)); } } @@ -503,12 +503,13 @@ public class WatchUpdaterService extends WearableListenerService implements return dm; } - private DataMap treatmentMap(long date, double bolus, double carbs, boolean isSMB) { + private DataMap treatmentMap(long date, double bolus, double carbs, boolean isSMB, boolean isValid) { DataMap dm = new DataMap(); dm.putLong("date", date); dm.putDouble("bolus", bolus); dm.putDouble("carbs", carbs); dm.putBoolean("isSMB", isSMB); + dm.putBoolean("isValid", isValid); return dm; } diff --git a/wear/src/main/java/info/nightscout/androidaps/data/BolusWatchData.java b/wear/src/main/java/info/nightscout/androidaps/data/BolusWatchData.java index 7179602fa8..6a474f3632 100644 --- a/wear/src/main/java/info/nightscout/androidaps/data/BolusWatchData.java +++ b/wear/src/main/java/info/nightscout/androidaps/data/BolusWatchData.java @@ -9,4 +9,5 @@ public class BolusWatchData { public double bolus; public double carbs; public boolean isSMB; + public boolean isValid; } diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java index 4926e924cb..2b4b969d62 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BIGChart.java @@ -412,6 +412,7 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre bwd.bolus = bolus.getDouble("bolus"); bwd.carbs = bolus.getDouble("carbs"); bwd.isSMB = bolus.getBoolean("isSMB"); + bwd.isValid = bolus.getBoolean("isValid"); bolusWatchDataList.add(bwd); } } diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java index fc7a3fbdd6..588437902b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java @@ -206,14 +206,14 @@ public class BgGraphBuilder { List pointValues = new ArrayList(); for (BolusWatchData bwd: bolusWatchDataList) { - if(bwd.date > start_time && !bwd.isSMB) { + if(bwd.date > start_time && !bwd.isSMB && !bwd.isValid && bwd.bolus > 0) { pointValues.add(new PointValue(fuzz(bwd.date), (float) offset-2)); } } Line line = new Line(pointValues); line.setColor(bolusColor); line.setHasLines(false); - line.setPointRadius(pointSize); + line.setPointRadius(pointSize*2); line.setHasPoints(true); return line; } @@ -223,7 +223,7 @@ public class BgGraphBuilder { List pointValues = new ArrayList(); for (BolusWatchData bwd: bolusWatchDataList) { - if(bwd.date > start_time && bwd.isSMB) { + if(bwd.date > start_time && bwd.isSMB && !bwd.isValid && bwd.bolus > 0) { pointValues.add(new PointValue(fuzz(bwd.date), (float) offset-2)); } }