diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java index bc6d3f061e..f22c07fa8a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCommon/defs/PumpType.java @@ -311,6 +311,15 @@ public enum PumpType { public PumpCapability getSpecialBasalDurations() { - return specialBasalDurations; + + if (isParentSet()) + { + return parent.getSpecialBasalDurations(); + } + else + { + return specialBasalDurations == null ? // + PumpCapability.BasalRate_Duration15and30minNotAllowed : specialBasalDurations; + } } } 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 4a85b5d462..361f52dd87 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 @@ -420,9 +420,13 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface { PumpType pumpTypeNew = PumpType.getByDescription(pumptype); + log.debug("Pump in configuration: {}, PumpType object: {}", pumptype, pumpTypeNew); + if (pumpType == pumpTypeNew) return; + log.debug("New pump configuration found ({}), changing from previous ({})", pumpTypeNew, pumpType); + // reset pumpDescription.resetSettings();