From 1500381e1477a1d53b2a0b123749fb401de4fa9b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 3 Aug 2023 13:38:48 +0200 Subject: [PATCH] fix IOB calculation --- .../plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index fa0474107b..2f80bc8425 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -211,7 +211,7 @@ class IobCobCalculatorPlugin @Inject constructor( val basalIobWithZeroTemp = basalIob.copy() val t = TemporaryBasal( timestamp = now + 60 * 1000L, - duration = 240, + duration = 240 * 60 * 1000L, rate = 0.0, isAbsolute = true, type = TemporaryBasal.Type.NORMAL @@ -239,7 +239,7 @@ class IobCobCalculatorPlugin @Inject constructor( val basalIobWithZeroTemp = basalIob.copy() val t = TemporaryBasal( timestamp = now + 60 * 1000L, - duration = 240, + duration = 240 * 60 * 1000L, rate = 0.0, isAbsolute = true, type = TemporaryBasal.Type.NORMAL