From cf91a3d8123322f6a44594f591aefd01f33f53ea Mon Sep 17 00:00:00 2001 From: Philoul Date: Thu, 10 Jun 2021 00:23:00 +0200 Subject: [PATCH] Improve accuracy of extended bolus duration (from 1 min to 1 second) --- .../androidaps/plugins/pump/insight/LocalInsightPlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 141f60a52a..e7e4447ba3 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1433,7 +1433,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai bolusID = insightDbHelper.getInsightBolusID(serial, event.getBolusID(), startTimestamp); // Line added to get id if (event.getBolusType() == BolusType.STANDARD || event.getBolusType() == BolusType.MULTIWAVE) { pumpSync.syncBolusWithPumpId( - bolusID.getTimestamp(), + startTimestamp, event.getImmediateAmount(), null, bolusID.getId(), @@ -1443,9 +1443,9 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) { if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null) pumpSync.syncExtendedBolusWithPumpId( - bolusID.getTimestamp(), + startTimestamp, event.getExtendedAmount(), - T.mins(event.getDuration()).msecs(), + timestamp - startTimestamp, isFakingTempsByExtendedBoluses(), bolusID.getId(), PumpType.ACCU_CHEK_INSIGHT,