From ede1e719d2881394a95f0a8d58edb02388e6a894 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 19 Mar 2018 13:33:40 +0100 Subject: [PATCH] CB.applyTBRRequest: enact same-rate TBR ... if requested duration is at least 30m longer than the currently running TBR. --- .../androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java | 1 + 1 file changed, 1 insertion(+) 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 24da254cee..40b7dec74c 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 @@ -395,6 +395,7 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr } } else if (activeTemp != null && activeTemp.getPlannedRemainingMinutes() > 5 + && request.duration - activeTemp.getPlannedRemainingMinutes() < 30 && Math.abs(request.rate - activeTemp.tempBasalConvertedToAbsolute(now, profile)) < pump.getPumpDescription().basalStep) { if (Config.logCongigBuilderActions) log.debug("applyAPSRequest: Temp basal set correctly");