Remove lastBolus, reservoirLevel.
This commit is contained in:
parent
4c1c1c43a3
commit
85e20a8977
|
@ -362,16 +362,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateLocalData(CommandResult result) {
|
private void updateLocalData(CommandResult result) {
|
||||||
if (result.reservoirLevel != PumpState.UNKNOWN) {
|
|
||||||
pump.reservoirLevel = result.reservoirLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.lastBolus != null) {
|
|
||||||
pump.lastBolus = result.lastBolus;
|
|
||||||
} else if (result.history != null && !result.history.bolusHistory.isEmpty()) {
|
|
||||||
pump.lastBolus = result.history.bolusHistory.get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.state.menu != null) {
|
if (result.state.menu != null) {
|
||||||
pump.state = result.state;
|
pump.state = result.state;
|
||||||
}
|
}
|
||||||
|
@ -463,8 +453,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
}
|
}
|
||||||
lastRequestedBolus = new Bolus(System.currentTimeMillis(), detailedBolusInfo.insulin, true);
|
lastRequestedBolus = new Bolus(System.currentTimeMillis(), detailedBolusInfo.insulin, true);
|
||||||
|
|
||||||
Bolus lastKnownBolus = pump.lastBolus;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pump.activity = MainApp.sResources.getString(R.string.combo_pump_action_bolusing, detailedBolusInfo.insulin);
|
pump.activity = MainApp.sResources.getString(R.string.combo_pump_action_bolusing, detailedBolusInfo.insulin);
|
||||||
MainApp.bus().post(new EventComboPumpUpdateGUI());
|
MainApp.bus().post(new EventComboPumpUpdateGUI());
|
||||||
|
@ -1047,7 +1035,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
JSONObject pumpJson = new JSONObject();
|
JSONObject pumpJson = new JSONObject();
|
||||||
pumpJson.put("clock", DateUtil.toISOString(pump.lastSuccessfulCmdTime));
|
pumpJson.put("clock", DateUtil.toISOString(pump.lastSuccessfulCmdTime));
|
||||||
// TODO can we upload empty/low/normal or is a int expected? If so, use fake numbers like 0/50/200
|
// TODO can we upload empty/low/normal or is a int expected? If so, use fake numbers like 0/50/200
|
||||||
pumpJson.put("reservoir", pump.reservoirLevel);
|
// pumpJson.put("reservoir", pump.reservoirState);
|
||||||
|
|
||||||
JSONObject statusJson = new JSONObject();
|
JSONObject statusJson = new JSONObject();
|
||||||
statusJson.put("status", getStateSummary());
|
statusJson.put("status", getStateSummary());
|
||||||
|
@ -1057,10 +1045,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
JSONObject extendedJson = new JSONObject();
|
JSONObject extendedJson = new JSONObject();
|
||||||
extendedJson.put("Version", BuildConfig.VERSION_NAME + "-" + BuildConfig.BUILDVERSION);
|
extendedJson.put("Version", BuildConfig.VERSION_NAME + "-" + BuildConfig.BUILDVERSION);
|
||||||
extendedJson.put("ActiveProfile", MainApp.getConfigBuilder().getProfileName());
|
extendedJson.put("ActiveProfile", MainApp.getConfigBuilder().getProfileName());
|
||||||
if (pump.lastBolus != null) {
|
|
||||||
extendedJson.put("LastBolus", new Date(pump.lastBolus.timestamp).toLocaleString());
|
|
||||||
extendedJson.put("LastBolusAmount", DecimalFormatter.to1Decimal(pump.lastBolus.amount));
|
|
||||||
}
|
|
||||||
PumpState ps = pump.state;
|
PumpState ps = pump.state;
|
||||||
if (ps.tbrActive) {
|
if (ps.tbrActive) {
|
||||||
extendedJson.put("TempBasalAbsoluteRate", ps.tbrRate);
|
extendedJson.put("TempBasalAbsoluteRate", ps.tbrRate);
|
||||||
|
|
|
@ -21,8 +21,6 @@ class ComboPump {
|
||||||
public volatile String activity;
|
public volatile String activity;
|
||||||
@NonNull
|
@NonNull
|
||||||
volatile PumpState state = new PumpState();
|
volatile PumpState state = new PumpState();
|
||||||
volatile int reservoirLevel = -1;
|
|
||||||
volatile Bolus lastBolus = null;
|
|
||||||
@NonNull
|
@NonNull
|
||||||
volatile BasalProfile basalProfile = new BasalProfile();
|
volatile BasalProfile basalProfile = new BasalProfile();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue