From 93a4afd56709b891fe79526b6c7096bf230ac5b9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 10 Sep 2018 20:28:45 +0200 Subject: [PATCH] Insight add 1 sec between cancel TBR and EB --- .../androidaps/plugins/PumpInsight/InsightPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java index 8721c4d87e..e65d713112 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java @@ -1,6 +1,7 @@ package info.nightscout.androidaps.plugins.PumpInsight; import android.content.DialogInterface; +import android.os.SystemClock; import android.support.v4.app.FragmentActivity; import android.support.v7.app.AlertDialog; @@ -576,7 +577,9 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai try { cancelExtendedBolus(); + SystemClock.sleep(1100); // to be sure db records are at least 1 sec off (for NS) realTBRCancel(); + SystemClock.sleep(1100); // to be sure db records are at least 1 sec off (for NS) updateGui(); if (L.isEnabled(L.PUMP)) log.debug("Canceling temp basal"); connector.requestHistorySync(5000);