From 36030683be97548cd90e1050c944f02458d2acd7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 17 Jan 2022 12:54:10 +0100 Subject: [PATCH] fix loop plugin TBR cancel --- .../info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt index a9deb0ab8b..09e4896525 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt @@ -534,8 +534,7 @@ class LoopPlugin @Inject constructor( callback?.result(PumpEnactResult(injector).absolute(request.rate).duration(0) .enacted(false).success(true).comment(R.string.basal_set_correctly))?.run() } - } - if (request.usePercent && allowPercentage()) { + } else if (request.usePercent && allowPercentage()) { if (request.percent == 100 && request.duration == 0) { if (activeTemp != null) { aapsLogger.debug(LTag.APS, "applyAPSRequest: cancelTempBasal()")