fix nullpointerexception in reading temp basal status
This commit is contained in:
parent
caa109dbfd
commit
a39416d876
2 changed files with 10 additions and 8 deletions
|
@ -709,11 +709,12 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
extended.put("PumpIOB", getDanaRPump().iob);
|
extended.put("PumpIOB", getDanaRPump().iob);
|
||||||
extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
|
extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
|
||||||
extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
|
extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
|
||||||
if (isTempBasalInProgress()) {
|
TempBasal tb = getTempBasal();
|
||||||
|
if (tb != null) {
|
||||||
extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate());
|
extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate());
|
||||||
extended.put("TempBasalStart", getTempBasal().timeStart.toLocaleString());
|
extended.put("TempBasalStart", tb.timeStart.toLocaleString());
|
||||||
extended.put("TempBasalRemaining", getTempBasal().getPlannedRemainingMinutes());
|
extended.put("TempBasalRemaining", tb.getPlannedRemainingMinutes());
|
||||||
extended.put("IsExtended", getTempBasal().isExtended);
|
extended.put("IsExtended", tb.isExtended);
|
||||||
}
|
}
|
||||||
extended.put("BaseBasalRate", getBaseBasalRate());
|
extended.put("BaseBasalRate", getBaseBasalRate());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -709,11 +709,12 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
|
||||||
extended.put("PumpIOB", getDanaRPump().iob);
|
extended.put("PumpIOB", getDanaRPump().iob);
|
||||||
// extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
|
// extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
|
||||||
// extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
|
// extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
|
||||||
if (isTempBasalInProgress()) {
|
TempBasal tb = getTempBasal();
|
||||||
|
if (tb != null) {
|
||||||
extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate());
|
extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate());
|
||||||
extended.put("TempBasalStart", getTempBasal().timeStart.toLocaleString());
|
extended.put("TempBasalStart", tb.timeStart.toLocaleString());
|
||||||
extended.put("TempBasalRemaining", getTempBasal().getPlannedRemainingMinutes());
|
extended.put("TempBasalRemaining", tb.getPlannedRemainingMinutes());
|
||||||
extended.put("IsExtended", getTempBasal().isExtended);
|
extended.put("IsExtended", tb.isExtended);
|
||||||
}
|
}
|
||||||
extended.put("BaseBasalRate", getBaseBasalRate());
|
extended.put("BaseBasalRate", getBaseBasalRate());
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue