From 85bb085188b9bd4b867fc871b5d9d2cb9291ee47 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 25 Apr 2018 12:51:27 +0200 Subject: [PATCH] rename safety to tempBasalFallback --- .../nightscout/androidaps/interfaces/APSInterface.java | 2 +- .../nightscout/androidaps/plugins/Loop/LoopPlugin.java | 8 ++++---- .../androidaps/plugins/OpenAPSAMA/OpenAPSAMAPlugin.java | 4 ++-- .../androidaps/plugins/OpenAPSMA/OpenAPSMAPlugin.java | 4 ++-- .../androidaps/plugins/OpenAPSSMB/OpenAPSSMBPlugin.java | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/APSInterface.java b/app/src/main/java/info/nightscout/androidaps/interfaces/APSInterface.java index 6c47dd9d6e..0b965d48af 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/APSInterface.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/APSInterface.java @@ -11,5 +11,5 @@ public interface APSInterface { public APSResult getLastAPSResult(); public Date getLastAPSRun(); - public void invoke(String initiator, boolean safety); + public void invoke(String initiator, boolean tempBasalFallback); } 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 9806df37a0..694c5c841b 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 @@ -258,7 +258,7 @@ public class LoopPlugin extends PluginBase { invoke(initiator, allowNotification, false); } - public void invoke(String initiator, boolean allowNotification, boolean safety) { + public void invoke(String initiator, boolean allowNotification, boolean tempBasalFallback) { try { if (Config.logFunctionCalls) log.debug("invoke from " + initiator); @@ -289,7 +289,7 @@ public class LoopPlugin extends PluginBase { APSInterface usedAPS = ConfigBuilderPlugin.getActiveAPS(); if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginType.APS)) { - usedAPS.invoke(initiator, safety); + usedAPS.invoke(initiator, tempBasalFallback); result = usedAPS.getLastAPSResult(); } @@ -364,9 +364,9 @@ public class LoopPlugin extends PluginBase { } else { new Thread(() -> { SystemClock.sleep(1000); - LoopPlugin.getPlugin().invoke("safety", allowNotification, true); + LoopPlugin.getPlugin().invoke("tempBasalFallback", allowNotification, true); }).start(); - FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run_Safety")); + FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run_TempBasalFallback")); } MainApp.bus().post(new EventLoopUpdateGui()); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAPlugin.java index 49973d6cd5..d31825cc4b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAPlugin.java @@ -88,8 +88,8 @@ public class OpenAPSAMAPlugin extends PluginBase implements APSInterface { } @Override - public void invoke(String initiator, boolean safety) { - log.debug("invoke from " + initiator + " safety: " + safety); + public void invoke(String initiator, boolean tempBasalFallback) { + log.debug("invoke from " + initiator + " safety: " + tempBasalFallback); lastAPSResult = null; DetermineBasalAdapterAMAJS determineBasalAdapterAMAJS; try { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAPlugin.java index 45a8ea470d..36e83e36e1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAPlugin.java @@ -88,8 +88,8 @@ public class OpenAPSMAPlugin extends PluginBase implements APSInterface { } @Override - public void invoke(String initiator, boolean safety) { - log.debug("invoke from " + initiator + " safety: " + safety); + public void invoke(String initiator, boolean tempBasalFallback) { + log.debug("invoke from " + initiator + " safety: " + tempBasalFallback); lastAPSResult = null; DetermineBasalAdapterMAJS determineBasalAdapterMAJS = null; try { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSSMB/OpenAPSSMBPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSSMB/OpenAPSSMBPlugin.java index 11fe65a082..c6edf60866 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSSMB/OpenAPSSMBPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSSMB/OpenAPSSMBPlugin.java @@ -91,8 +91,8 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface { } @Override - public void invoke(String initiator, boolean safety) { - log.debug("invoke from " + initiator + " safety: " + safety); + public void invoke(String initiator, boolean tempBasalFallback) { + log.debug("invoke from " + initiator + " safety: " + tempBasalFallback); lastAPSResult = null; DetermineBasalAdapterSMBJS determineBasalAdapterSMBJS = null; try { @@ -184,11 +184,11 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface { lastAutosensResult = new AutosensResult(); } - Constraint smbAllowed = new Constraint<>(!safety); + Constraint smbAllowed = new Constraint<>(!tempBasalFallback); MainApp.getConstraintChecker().isSMBModeEnabled(smbAllowed); inputConstraints.copyReasons(smbAllowed); - Constraint advancedFiltering = new Constraint<>(!safety); + Constraint advancedFiltering = new Constraint<>(!tempBasalFallback); MainApp.getConstraintChecker().isAdvancedFilteringEnabled(advancedFiltering); inputConstraints.copyReasons(advancedFiltering);