diff --git a/app/src/main/java/info/nightscout/androidaps/data/Profile.java b/app/src/main/java/info/nightscout/androidaps/data/Profile.java index cb17802777..2cb3dd3f62 100644 --- a/app/src/main/java/info/nightscout/androidaps/data/Profile.java +++ b/app/src/main/java/info/nightscout/androidaps/data/Profile.java @@ -218,16 +218,18 @@ public class Profile { if (isValid) { // Check for hours alignment - for (int index = 0; index < basal_v.size(); index++) { - long secondsFromMidnight = basal_v.keyAt(index); - if (secondsFromMidnight % 3600 != 0) { - Notification notification = new Notification(Notification.BASAL_PROFILE_NOT_ALIGNED_TO_HOURS, String.format(MainApp.gs(R.string.basalprofilenotaligned), from), Notification.NORMAL); - MainApp.bus().post(new EventNewNotification(notification)); + PumpInterface pump = MainApp.getConfigBuilder().getActivePump(); + if (!pump.getPumpDescription().is30minBasalRatesCapable) { + for (int index = 0; index < basal_v.size(); index++) { + long secondsFromMidnight = basal_v.keyAt(index); + if (secondsFromMidnight % 3600 != 0) { + Notification notification = new Notification(Notification.BASAL_PROFILE_NOT_ALIGNED_TO_HOURS, String.format(MainApp.gs(R.string.basalprofilenotaligned), from), Notification.NORMAL); + MainApp.bus().post(new EventNewNotification(notification)); + } } } // Check for minimal basal value - PumpInterface pump = ConfigBuilderPlugin.getActivePump(); if (pump != null) { PumpDescription description = pump.getPumpDescription(); for (int i = 0; i < basal_v.size(); i++) { diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java index 86e33d618d..cc7b3b3e85 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.java @@ -39,4 +39,6 @@ public class PumpDescription { public boolean isRefillingCapable = false; public boolean storesCarbInfo = true; + + public boolean is30minBasalRatesCapable = false; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPumpPlugin.java index ba5fa0fa11..7c35d0a790 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPumpPlugin.java @@ -155,6 +155,7 @@ public class InsightPumpPlugin implements PluginBase, PumpInterface, Constraints pumpDescription.isRefillingCapable = true; //pumpDescription.storesCarbInfo = false; + pumpDescription.is30minBasalRatesCapable = true; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index 346750fa0a..2ceefcb4c3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -101,6 +101,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { pumpDescription.isRefillingCapable = false; pumpDescription.storesCarbInfo = false; + pumpDescription.is30minBasalRatesCapable = true; } @Override