From 71355f0421fef24396a2c52611b5572ffc95b7e6 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 13 Dec 2017 16:01:35 +0100 Subject: [PATCH] Typo that typo and other minor cleanups. --- Testing-Combo.md | 2 +- .../nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java | 1 + .../java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Testing-Combo.md b/Testing-Combo.md index 56e9860f8f..7346561c56 100644 --- a/Testing-Combo.md +++ b/Testing-Combo.md @@ -12,7 +12,7 @@ - [ ] bolus must have been fully delivered by pump - [ ] bolus must have been added to DB - [ ] the confirmed pump warning must be raised as a notification in AAPS - - [ ] notification must also appear on smartwatch + (or as android notification on watch/smartphone if setting "use system notifications ..." is enabled - [ ] An error during bolus must yield an error in AAPS - [ ] An error during bolus must yield a notification on a smartwatch - [ ] Test bolusing a bolus bigger than what's left in the reservoir. A message to check what 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 9022f985a9..e249c58981 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 @@ -231,6 +231,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf @Override public void disconnect(String reason) { + log.debug("Disconnect called with reason: " + reason); ruffyScripter.disconnect(); } diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java index aea5da5a0b..77762bbf09 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java @@ -94,6 +94,9 @@ public class SetTbrCommand extends BaseCommand { // rounds seconds up to full minutes). In that case confirm the alert since we know // we caused it (in a way), but still fail the command so the usual cleanups of returning // to main menu etc are performed, after which this command can simply be retried. + // Note that this situation should have been dealt with in + // #checkAndWaitIfExistingTbrIsAboutToEnd, but still occur if that method runs + // into a timeout or some other freaky thing happens, so we'll leave it here. WarningOrErrorCode warningOrErrorCode = scripter.readWarningOrErrorCode(); if (Objects.equals(warningOrErrorCode.warningCode, PumpWarningCodes.TBR_CANCELLED)) { scripter.confirmAlert(PumpWarningCodes.TBR_CANCELLED); @@ -111,7 +114,7 @@ public class SetTbrCommand extends BaseCommand { * and all). To avoid this, wait until the active TBR runs out if the active TBR * is about to end. * - * @return true wf we waited till the TBR ended and cancellation was request so all work is done. + * @return true if we waited till the TBR ended and cancellation was request so all work is done. */ private boolean checkAndWaitIfExistingTbrIsAboutToEnd(boolean cancellingTbr) { scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);