always upload current basal rate

This commit is contained in:
Milos Kozak 2016-11-08 17:55:39 +01:00
parent a4a9efd812
commit 94a7033e0c

View file

@ -592,19 +592,19 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
battery.put("percent", getDanaRPump().batteryRemaining); battery.put("percent", getDanaRPump().batteryRemaining);
status.put("status", "normal"); status.put("status", "normal");
status.put("timestamp", DateUtil.toISOString(getDanaRPump().lastConnection)); status.put("timestamp", DateUtil.toISOString(getDanaRPump().lastConnection));
extended.put("PumpIOB", getDanaRPump().iob);
extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
if (isTempBasalInProgress()) { if (isTempBasalInProgress()) {
extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate()); extended.put("TempBasalAbsoluteRate", getTempBasalAbsoluteRate());
extended.put("TempBasalStart", getTempBasal().timeStart.toLocaleString()); extended.put("TempBasalStart", getTempBasal().timeStart.toLocaleString());
extended.put("TempBasalRemaining", getTempBasal().getPlannedRemainingMinutes()); extended.put("TempBasalRemaining", getTempBasal().getPlannedRemainingMinutes());
extended.put("IsExtended", getTempBasal().isExtended); extended.put("IsExtended", getTempBasal().isExtended);
extended.put("BaseBasalRate", getBaseBasalRate());
try { try {
extended.put("ActiveProfile", MainApp.getConfigBuilder().getActiveProfile().getProfile().getActiveProfile()); extended.put("ActiveProfile", MainApp.getConfigBuilder().getActiveProfile().getProfile().getActiveProfile());
} catch (Exception e) {} } catch (Exception e) {}
} }
extended.put("PumpIOB", getDanaRPump().iob); extended.put("BaseBasalRate", getBaseBasalRate());
extended.put("LastBolus", getDanaRPump().lastBolusTime.toLocaleString());
extended.put("LastBolusAmount", getDanaRPump().lastBolusAmount);
pump.put("battery", battery); pump.put("battery", battery);
pump.put("status", status); pump.put("status", status);