Set Source.PUMP when bolusing (already reading from history).
(cherry picked from commit d747415)
This commit is contained in:
parent
720e64e541
commit
383750d5e8
|
@ -532,9 +532,11 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
|
|
||||||
// add treatment record to DB (if it wasn't cancelled)
|
// add treatment record to DB (if it wasn't cancelled)
|
||||||
if (lastPumpBolus != null && (lastPumpBolus.amount > 0)) {
|
if (lastPumpBolus != null && (lastPumpBolus.amount > 0)) {
|
||||||
detailedBolusInfo.date = reservoirBolusResult.lastBolus.timestamp;
|
detailedBolusInfo.date = lastPumpBolus.timestamp;
|
||||||
detailedBolusInfo.insulin = lastPumpBolus.amount;
|
detailedBolusInfo.insulin = lastPumpBolus.amount;
|
||||||
detailedBolusInfo.date = lastPumpBolus.timestamp;
|
detailedBolusInfo.date = lastPumpBolus.timestamp;
|
||||||
|
detailedBolusInfo.source = Source.PUMP;
|
||||||
|
detailedBolusInfo.pumpId = lastPumpBolus.timestamp;
|
||||||
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
|
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
|
||||||
return new PumpEnactResult().success(true).enacted(true)
|
return new PumpEnactResult().success(true).enacted(true)
|
||||||
.bolusDelivered(lastPumpBolus.amount).carbsDelivered(detailedBolusInfo.carbs);
|
.bolusDelivered(lastPumpBolus.amount).carbsDelivered(detailedBolusInfo.carbs);
|
||||||
|
|
Loading…
Reference in a new issue