diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt index 8f2ccb99ab..1843492345 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/data/AutosensDataStoreObject.kt @@ -153,6 +153,7 @@ class AutosensDataStoreObject : AutosensDataStore { var diff = abs(someTime - referenceTime) diff %= T.mins(5).msecs() if (diff > T.mins(2).plus(T.secs(30)).msecs()) diff -= T.mins(5).msecs() + diff = abs(diff) return someTime + diff }