Remove lastBolus, reservoirLevel.

This commit is contained in:
Johannes Mockenhaupt 2017-12-04 23:49:11 +01:00
parent 4c1c1c43a3
commit 85e20a8977
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 1 additions and 19 deletions

View file

@ -362,16 +362,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
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) {
pump.state = result.state;
}
@ -463,8 +453,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
lastRequestedBolus = new Bolus(System.currentTimeMillis(), detailedBolusInfo.insulin, true);
Bolus lastKnownBolus = pump.lastBolus;
try {
pump.activity = MainApp.sResources.getString(R.string.combo_pump_action_bolusing, detailedBolusInfo.insulin);
MainApp.bus().post(new EventComboPumpUpdateGUI());
@ -1047,7 +1035,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
JSONObject pumpJson = new JSONObject();
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
pumpJson.put("reservoir", pump.reservoirLevel);
// pumpJson.put("reservoir", pump.reservoirState);
JSONObject statusJson = new JSONObject();
statusJson.put("status", getStateSummary());
@ -1057,10 +1045,6 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
JSONObject extendedJson = new JSONObject();
extendedJson.put("Version", BuildConfig.VERSION_NAME + "-" + BuildConfig.BUILDVERSION);
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;
if (ps.tbrActive) {
extendedJson.put("TempBasalAbsoluteRate", ps.tbrRate);

View file

@ -21,8 +21,6 @@ class ComboPump {
public volatile String activity;
@NonNull
volatile PumpState state = new PumpState();
volatile int reservoirLevel = -1;
volatile Bolus lastBolus = null;
@NonNull
volatile BasalProfile basalProfile = new BasalProfile();