From a93485a3c08697e914bec653a8d11de9ed5d7039 Mon Sep 17 00:00:00 2001 From: Tim Gunn <2896311+Tornado-Tim@users.noreply.github.com> Date: Thu, 9 Jul 2020 00:46:10 +1200 Subject: [PATCH] Fix the greenbox --- .../androidaps/plugins/general/overview/OverviewFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index acc33ba130..dde10f747f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -655,7 +655,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList // If the target is not the same as set in the profile then oref has overridden it val targetUsed = lastRun?.constraintsProcessed?.targetBG ?: 0.0 - if (targetUsed != 0.0 && profile.targetMgdl != targetUsed) { + if (targetUsed != 0.0 && abs(profile.targetMgdl-targetUsed) > 0.01) { aapsLogger.debug("Adjusted target. Profile: ${profile.targetMgdl} APS: $targetUsed") overview_temptarget?.text = Profile.toTargetRangeString(targetUsed, targetUsed, Constants.MGDL, units) overview_temptarget?.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning))