Fixed Bug that doesn't show COB if BGI disabled.
This commit is contained in:
parent
eb98ca7658
commit
b11707b5d4
1 changed files with 5 additions and 5 deletions
|
@ -202,13 +202,13 @@ public class StatuslinePlugin extends PluginBase {
|
||||||
+ DecimalFormatter.to2Decimal(basalIob.basaliob) + ")";
|
+ DecimalFormatter.to2Decimal(basalIob.basaliob) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mPrefs.getBoolean("xdripstatus_showbgi", false)) {
|
// BGI
|
||||||
return status;
|
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();
|
/* COB */
|
||||||
|
|
||||||
status += " " + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to2Decimal(bgi);
|
|
||||||
status += " " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "StatuslinePlugin").generateCOBString();
|
status += " " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "StatuslinePlugin").generateCOBString();
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in a new issue