From 882f400d1ef8d61c0d5ecc203bbd4ce6babb070e Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 6 Sep 2017 12:22:22 +0200 Subject: [PATCH] Disable incomplete parts in ExperimentalBolusCommand. --- .../scripter/commands/ExperimentalBolusCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/commands/ExperimentalBolusCommand.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/commands/ExperimentalBolusCommand.java index 951b025edf..d493d95433 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/commands/ExperimentalBolusCommand.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/scripter/commands/ExperimentalBolusCommand.java @@ -118,6 +118,7 @@ public class ExperimentalBolusCommand extends BolusCommand { lastBolusReported = bolusRemaining; } + /* // TODO think through situatiotns where an alarm can be raised, not just when pressing a button, // but a 'low battery' alarm can trigger at any time ... if (scripter.getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR) { @@ -130,11 +131,14 @@ public class ExperimentalBolusCommand extends BolusCommand { break; } } + */ + SystemClock.sleep(50); bolusRemaining = (Double) scripter.getCurrentMenu().getAttribute(MenuAttribute.BOLUS_REMAINING); } progressReportCallback.report(DELIVERED, 100, bolus); + /* // wait up to 2s for any possible warning to be raised, if not raised already // TODO what could be raised here, other than those alarms than can ring at any time anyways? long timeout = System.currentTimeMillis() + 2 * 1000; @@ -144,12 +148,12 @@ public class ExperimentalBolusCommand extends BolusCommand { // process warnings (confirm them, report back to AAPS about them) // while (scripter.getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR || System.currentTimeMillis() < timeout) { - // TODO brute-force hack if (scripter.getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR) { scripter.confirmAlert(((String) scripter.getCurrentMenu().getAttribute(MenuAttribute.MESSAGE)), 1000); } // SystemClock.sleep(50); // } + */ // TODO what if we hit 'cartridge low' alert here? is it immediately displayed or after the bolus? // TODO how are error states reported back to the caller that occur outside of calls in genal? Low battery, low cartridge?