From 6bbb785574548923135f6a71b4e265cd57ec2158 Mon Sep 17 00:00:00 2001 From: Timm Korte Date: Fri, 11 Aug 2017 23:22:55 +0200 Subject: [PATCH] rename 'userRequested' to 'force' as parameter to cancelTempBasal in order to have the same naming as with setTempBasalAbsolute --- .../nightscout/androidaps/interfaces/PumpInterface.java | 6 +++--- .../plugins/ConfigBuilder/ConfigBuilderPlugin.java | 4 ++-- .../androidaps/plugins/PumpDanaR/DanaRPlugin.java | 4 ++-- .../plugins/PumpDanaRKorean/DanaRKoreanPlugin.java | 4 ++-- .../androidaps/plugins/PumpDanaRv2/DanaRv2Plugin.java | 4 ++-- .../nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java | 2 +- .../androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java index d3e8d0f21e..2db7564de7 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java @@ -34,9 +34,9 @@ public interface PumpInterface { PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, boolean force); PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes); PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes); - //some pumps might set a very short temp close to 100% as canecelling a temp can be noisy - //when the cancel request is requested by the user, the pump should always do a real cancel - PumpEnactResult cancelTempBasal(boolean userRequested); + //some pumps might set a very short temp close to 100% as cancelling a temp can be noisy + //when the cancel request is requested by the user (forced), the pump should always do a real cancel + PumpEnactResult cancelTempBasal(boolean force); PumpEnactResult cancelExtendedBolus(); // Status to be passed to NS 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 769ca94d9c..e4e4aac7cc 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 @@ -513,8 +513,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { - PumpEnactResult result = activePump.cancelTempBasal(userRequested); + public PumpEnactResult cancelTempBasal(boolean force) { + PumpEnactResult result = activePump.cancelTempBasal(force); if (Config.logCongigBuilderActions) log.debug("cancelTempBasal success: " + result.success + " enacted: " + result.enacted); return result; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java index b33db24995..2e01ee662d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java @@ -400,7 +400,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C if (Config.logPumpActions) log.debug("setTempBasalAbsolute: currently running: " + running.toString()); if (running.percentRate == percentRate) { - if (force == true) { + if (force) { cancelTempBasal(true); } else { result.success = true; @@ -576,7 +576,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, DanaRInterface, C } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean force) { if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) return cancelRealTempBasal(); if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanPlugin.java index 6f792f066e..84552946ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanPlugin.java @@ -398,7 +398,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) { // Correct basal already set ? if (MainApp.getConfigBuilder().getRealTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) { - if (force == true) { + if (force) { cancelTempBasal(true); } else { result.success = true; @@ -574,7 +574,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, DanaRInterf } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean force) { if (MainApp.getConfigBuilder().isInHistoryRealTempBasalInProgress()) return cancelRealTempBasal(); if (MainApp.getConfigBuilder().isInHistoryExtendedBoluslInProgress() && useExtendedBoluses) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Plugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Plugin.java index 4fa9db6ee0..97840ad34b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Plugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Plugin.java @@ -365,7 +365,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface, if (MainApp.getConfigBuilder().isTempBasalInProgress()) { // Correct basal already set ? if (MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis()).percentRate == percentRate) { - if (force == true) { + if (force) { cancelTempBasal(true); } else { result.success = true; @@ -515,7 +515,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, DanaRInterface, } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean force) { PumpEnactResult result = new PumpEnactResult(); if (pump.isTempBasalInProgress) { sExecutionService.tempBasalStop(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java index 7c0e28ec97..f9f4b6fa2d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java @@ -196,7 +196,7 @@ public class MDIPlugin implements PluginBase, PumpInterface { } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean force) { PumpEnactResult result = new PumpEnactResult(); result.success = false; result.comment = MainApp.instance().getString(R.string.pumperror); 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 5d3899b0af..c04ec9b12f 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 @@ -337,7 +337,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean force) { TreatmentsInterface treatmentsInterface = MainApp.getConfigBuilder(); PumpEnactResult result = new PumpEnactResult(); result.success = true;