Set result.bolusDelivered in Insight driver

This commit is contained in:
Tebbe Ubben 2019-03-31 01:39:08 +01:00
parent ae60d68719
commit 4b86a07eac

View file

@ -512,6 +512,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
PumpEnactResult result = new PumpEnactResult();
if (detailedBolusInfo.insulin > 0) {
try {
detailedBolusInfo.insulin = Math.round(detailedBolusInfo.insulin / 0.01) * 0.01;
synchronized ($bolusLock) {
DeliverBolusMessage bolusMessage = new DeliverBolusMessage();
bolusMessage.setBolusType(BolusType.STANDARD);
@ -592,6 +593,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
result.enacted = true;
}
result.carbsDelivered = detailedBolusInfo.carbs;
result.bolusDelivered = detailedBolusInfo.insulin;
return result;
}