From 85e20a89775a2fb542f7862cc3ec3ca0c6af7de7 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 4 Dec 2017 23:49:11 +0100 Subject: [PATCH] Remove lastBolus, reservoirLevel. --- .../plugins/PumpCombo/ComboPlugin.java | 18 +----------------- .../plugins/PumpCombo/ComboPump.java | 2 -- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index e725272bb6..f38c06fb32 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -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); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java index fb800517d7..62ef1d10f8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java @@ -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();