COB in external status
This commit is contained in:
parent
f75329f5dc
commit
915dac8ef3
1 changed files with 3 additions and 1 deletions
|
@ -25,6 +25,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.IobCobCalculator.CobInfo;
|
||||||
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.utils.DecimalFormatter;
|
import info.nightscout.utils.DecimalFormatter;
|
||||||
|
@ -130,7 +131,7 @@ public class StatuslinePlugin extends PluginBase {
|
||||||
IobTotal bolusIob = treatmentsInterface.getLastCalculationTreatments().round();
|
IobTotal bolusIob = treatmentsInterface.getLastCalculationTreatments().round();
|
||||||
treatmentsInterface.updateTotalIOBTempBasals();
|
treatmentsInterface.updateTotalIOBTempBasals();
|
||||||
IobTotal basalIob = treatmentsInterface.getLastCalculationTempBasals().round();
|
IobTotal basalIob = treatmentsInterface.getLastCalculationTempBasals().round();
|
||||||
status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob);
|
status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob)+"U";
|
||||||
|
|
||||||
|
|
||||||
if (mPrefs.getBoolean("xdripstatus_detailediob", true)) {
|
if (mPrefs.getBoolean("xdripstatus_detailediob", true)) {
|
||||||
|
@ -146,6 +147,7 @@ public class StatuslinePlugin extends PluginBase {
|
||||||
double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf();
|
double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf();
|
||||||
|
|
||||||
status += " " + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to2Decimal(bgi);
|
status += " " + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to2Decimal(bgi);
|
||||||
|
status += " " + CobInfo.generateCOBString();
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue