Set Source.PUMP when bolusing (already reading from history).

(cherry picked from commit d747415)
This commit is contained in:
Johannes Mockenhaupt 2017-11-26 20:03:58 +01:00
parent 720e64e541
commit 383750d5e8
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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);