From 5e9b03cffd7f5a0b92aa4b4f2d2f113daa9d67e6 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 15 Sep 2021 23:49:34 +0200 Subject: [PATCH] fix tests --- .../java/info/nightscout/androidaps/data/ProfileSealed.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt b/core/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt index 93d863aaee..1dbba939d6 100644 --- a/core/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt +++ b/core/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt @@ -162,7 +162,7 @@ sealed class ProfileSealed( } for (target in targetBlocks) { if (!hardLimits.isInRange( - Round.roundTo(target.lowTarget, 0.1), + Profile.toMgdl(target.lowTarget, units), HardLimits.VERY_HARD_LIMIT_MIN_BG[0].toDouble(), HardLimits.VERY_HARD_LIMIT_MIN_BG[1].toDouble() ) @@ -172,7 +172,7 @@ sealed class ProfileSealed( break } if (!hardLimits.isInRange( - Round.roundTo(target.highTarget, 0.1), + Profile.toMgdl(target.highTarget, units), HardLimits.VERY_HARD_LIMIT_MAX_BG[0].toDouble(), HardLimits.VERY_HARD_LIMIT_MAX_BG[1].toDouble() )