From a23545bbc1b5e2fb6e2aa9bec0c821d12f83af89 Mon Sep 17 00:00:00 2001 From: Philoul Date: Thu, 25 Mar 2021 17:53:54 +0100 Subject: [PATCH] Avoid SMB with 0.00 value --- .../info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 8c2a43ea1b..874026ddab 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 @@ -609,7 +609,8 @@ open class LoopPlugin @Inject constructor( detailedBolusInfo.source = Source.USER detailedBolusInfo.deliverAt = request.deliverAt aapsLogger.debug(LTag.APS, "applyAPSRequest: bolus()") - uel.log(Action.SMB, ValueWithUnit(Sources.Loop), ValueWithUnit(detailedBolusInfo.insulin, Units.U)) + if (request.smb > 0.0) + uel.log(Action.SMB, ValueWithUnit(Sources.Loop), ValueWithUnit(detailedBolusInfo.insulin, Units.U)) commandQueue.bolus(detailedBolusInfo, callback) }