Avoid SMB with 0.00 value

This commit is contained in:
Philoul 2021-03-25 17:53:54 +01:00
parent 6e0d21a874
commit a23545bbc1

View file

@ -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)
}