From b11707b5d44c12756138e73f43a5130fb5b4d3e4 Mon Sep 17 00:00:00 2001 From: sabsoubi Date: Fri, 21 Feb 2020 11:04:59 +0100 Subject: [PATCH] Fixed Bug that doesn't show COB if BGI disabled. --- .../general/xdripStatusline/StatuslinePlugin.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatuslinePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatuslinePlugin.java index da61b83b98..bd5b7e4eab 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatuslinePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatuslinePlugin.java @@ -202,13 +202,13 @@ public class StatuslinePlugin extends PluginBase { + DecimalFormatter.to2Decimal(basalIob.basaliob) + ")"; } - if (!mPrefs.getBoolean("xdripstatus_showbgi", false)) { - return status; + // BGI + if (mPrefs.getBoolean("xdripstatus_showbgi", true)) { + double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf(); + status += " " + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to2Decimal(bgi); } - double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf(); - - status += " " + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to2Decimal(bgi); + /* COB */ status += " " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "StatuslinePlugin").generateCOBString(); return status;