From 383750d5e890a78c1f951912e48124d738ca476d Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sun, 26 Nov 2017 20:03:58 +0100 Subject: [PATCH] Set Source.PUMP when bolusing (already reading from history). (cherry picked from commit d747415) --- .../nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 b1f6ed4967..d9fa3ca934 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 @@ -532,9 +532,11 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf // add treatment record to DB (if it wasn't cancelled) if (lastPumpBolus != null && (lastPumpBolus.amount > 0)) { - detailedBolusInfo.date = reservoirBolusResult.lastBolus.timestamp; + detailedBolusInfo.date = lastPumpBolus.timestamp; detailedBolusInfo.insulin = lastPumpBolus.amount; detailedBolusInfo.date = lastPumpBolus.timestamp; + detailedBolusInfo.source = Source.PUMP; + detailedBolusInfo.pumpId = lastPumpBolus.timestamp; MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo); return new PumpEnactResult().success(true).enacted(true) .bolusDelivered(lastPumpBolus.amount).carbsDelivered(detailedBolusInfo.carbs);