From 5ce956b5fcd8e6b50c707d13fdb1ef48e13e85fb Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Fri, 10 Nov 2017 00:57:13 +0100 Subject: [PATCH] quick fix for cancelling tbr to fake neutral temp. --- .../androidaps/plugins/PumpCombo/ComboPlugin.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 616a43db0a..5175a84177 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -146,7 +146,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf return MainApp.sResources.getString(R.string.combo_pump_state_suspended_due_to_error); else if (ps.suspended) return MainApp.sResources.getString(R.string.combo_pump_state_suspended_by_user); - return MainApp.sResources.getString(R.string.combo_pump_state_normal); + return MainApp.sResources.getString(R.string.combo_pump_state_running); } @Override @@ -574,7 +574,9 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf log.debug("cancelTempBasal: changing TBR to " + percentage + "% for 15 mins."); commandResult = runCommand(MainApp.sResources.getString(R.string.combo_pump_action_cancelling_tbr), 2, () -> ruffyScripter.setTbr(percentage, 15)); - if (!commandResult.state.tbrActive) { + // TODO properly check fake neutral temp is active +// if (!commandResult.state.tbrActive) { + if (commandResult.success) { tempBasal = new TemporaryBasal(System.currentTimeMillis()); tempBasal.durationInMinutes = 15; tempBasal.source = Source.USER; @@ -807,7 +809,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf } private void syncHistory(final PumpHistoryRequest request) { - CommandResult result = runCommand("Syncing pump history", 3, () -> ruffyScripter.readHistory(request)); + CommandResult result = runCommand(MainApp.sResources.getString(R.string.combo_activity_reading_pump_history), 3, () -> ruffyScripter.readHistory(request)); if (!result.success) { // TODO }