From 5c36094b8b19fbd16984786125f4736280a3f698 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Thu, 20 Jul 2017 13:12:15 +0200 Subject: [PATCH] Remove some debug code. --- .../plugins/PumpCombo/ComboPlugin.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 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 de0d4e9b9b..7f68b13b92 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 @@ -451,13 +451,6 @@ public class ComboPlugin implements PluginBase, PumpInterface { if (unroundedPercentage != roundedPercentage) { log.debug("Rounded requested rate " + unroundedPercentage + "% -> " + roundedPercentage + "%"); } - /* GL jotomo/AndroidAPS#18 - int stepSize = pumpDescription.tempDurationStep; - if (durationInMinutes > stepSize) { - log.debug("Reducing requested duration of " + durationInMinutes + "m to minimal duration supported by the pump: " + stepSize + "m"); - durationInMinutes = stepSize; - } - */ return setTempBasalPercent(roundedPercentage, durationInMinutes); } @@ -471,26 +464,11 @@ public class ComboPlugin implements PluginBase, PumpInterface { log.debug("Rounded requested percentage from " + percent + " to " + rounded); percent = rounded; } - // TODO experimenting .... with the BT connect costing time, this leads to the TBR - // still running on the last minute when OpenAPS is run again, which will NOT enact - // anything as it sees a TBR is still running. So fake that the TBR has started earlier - // and is assumed to be over already. With the Combo, setting a TBR while an existing TBR - // is still running is a no-issue: the new TBR simply overrides the existing. - - // can this lead to errors where AAPS tries to cancel a TBR that isn't running? ... - // hm, TBRs on teh pump run 20s later, so no, it'd have to be the other way round. sounds good. - - - // TODO check: if new TBR overrides existing one: who makes call to TempBasel end??? - - long tbrStart = System.currentTimeMillis(); - // TODO DanaR sets tempStart to now -1 to acound for delay from pump? - CommandResult commandResult = runCommand(new SetTbrCommand(percent, durationInMinutes)); if (commandResult.enacted) { // make sure we're not skipping a loop iteration by a few secs - TemporaryBasal tempStart = new TemporaryBasal(commandResult.completionTime); // - 5_000); + TemporaryBasal tempStart = new TemporaryBasal(commandResult.completionTime); // TODO commandResult.state.tbrRemainingDuration might already display 29 if 30 was set, since 29:59 is shown as 29 ... // we should check this, but really ... something must be really screwed up if that number was anything different tempStart.durationInMinutes = durationInMinutes;