diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 2118650630..95a89c58e0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -43,7 +43,7 @@ public class ConfigBuilderPlugin extends PluginBase { private BgSourceInterface activeBgSource; private PumpInterface activePump; private ProfileInterface activeProfile; - private static APSInterface activeAPS; + private APSInterface activeAPS; private static InsulinInterface activeInsulin; private static SensitivityInterface activeSensitivity; @@ -244,7 +244,7 @@ public class ConfigBuilderPlugin extends PluginBase { return activeInsulin; } - public static APSInterface getActiveAPS() { + public APSInterface getActiveAPS() { return activeAPS; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/objectives/Objective1.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/objectives/Objective1.java index d1f4f3ebd7..39127c4d45 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/objectives/Objective1.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/objectives/Objective1.java @@ -68,7 +68,7 @@ public class Objective1 extends Objective { tasks.add(new Task(R.string.apsselected) { @Override public boolean isCompleted() { - APSInterface usedAPS = ConfigBuilderPlugin.getActiveAPS(); + APSInterface usedAPS = ConfigBuilderPlugin.getPlugin().getActiveAPS(); if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginType.APS)) return true; return false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java index a57547bd4a..1b4d9b2347 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java @@ -293,7 +293,7 @@ public class LoopPlugin extends PluginBase { // Check if pump info is loaded if (pump.getBaseBasalRate() < 0.01d) return; - APSInterface usedAPS = ConfigBuilderPlugin.getActiveAPS(); + APSInterface usedAPS = ConfigBuilderPlugin.getPlugin().getActiveAPS(); if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginType.APS)) { usedAPS.invoke(initiator, tempBasalFallback); result = usedAPS.getLastAPSResult(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java index 5c2a00ac02..a2e7006a25 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java @@ -512,7 +512,7 @@ public class ActionStringHandler { } else { ret += "OPEN LOOP\n"; } - final APSInterface aps = ConfigBuilderPlugin.getActiveAPS(); + final APSInterface aps = ConfigBuilderPlugin.getPlugin().getActiveAPS(); ret += "APS: " + ((aps == null) ? "NO APS SELECTED!" : ((PluginBase) aps).getName()); if (LoopPlugin.lastRun != null) { if (LoopPlugin.lastRun.lastAPSRun != null) @@ -566,7 +566,7 @@ public class ActionStringHandler { return "No profile set :("; } - APSInterface usedAPS = ConfigBuilderPlugin.getActiveAPS(); + APSInterface usedAPS = ConfigBuilderPlugin.getPlugin().getActiveAPS(); if (usedAPS == null) { return "No active APS :(!"; }