From 79cafc14f50a9f0f70bf7fef3d5197d86e43b5f3 Mon Sep 17 00:00:00 2001 From: TebbeUbben Date: Thu, 28 May 2020 15:24:53 +0200 Subject: [PATCH 1/3] Insight: Log end events five seconds earlier --- .../androidaps/plugins/pump/insight/LocalInsightPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index f8d1cf1ce5..1b8331ac41 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1382,7 +1382,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements PumpInterface, pumpID.eventID = event.getEventPosition(); pumpID.pumpSerial = serial; pumpID.eventType = "EndOfTBR"; - pumpID.timestamp = timestamp; + pumpID.timestamp = timestamp - 5000L; MainApp.getDbHelper().createOrUpdate(pumpID); TemporaryBasal temporaryBasal = new TemporaryBasal(getInjector()); temporaryBasal.durationInMinutes = 0; From 02aff75dff9af5d56bec2bcdc3d609ea3058e2b3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 28 May 2020 21:33:36 +0200 Subject: [PATCH 2/3] change delay to 1.5s --- .../androidaps/plugins/pump/insight/LocalInsightPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 1b8331ac41..94548a7b30 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1382,7 +1382,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements PumpInterface, pumpID.eventID = event.getEventPosition(); pumpID.pumpSerial = serial; pumpID.eventType = "EndOfTBR"; - pumpID.timestamp = timestamp - 5000L; + pumpID.timestamp = timestamp - 1500L; MainApp.getDbHelper().createOrUpdate(pumpID); TemporaryBasal temporaryBasal = new TemporaryBasal(getInjector()); temporaryBasal.durationInMinutes = 0; From 5395ca4e71539b2e70a1a71252894afed3cef424 Mon Sep 17 00:00:00 2001 From: Tebbe Ubben Date: Fri, 29 May 2020 19:51:13 +0200 Subject: [PATCH 3/3] Update LocalInsightPlugin.java --- .../androidaps/plugins/pump/insight/LocalInsightPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 94548a7b30..aebcb7eaf6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1382,13 +1382,13 @@ public class LocalInsightPlugin extends PumpPluginBase implements PumpInterface, pumpID.eventID = event.getEventPosition(); pumpID.pumpSerial = serial; pumpID.eventType = "EndOfTBR"; - pumpID.timestamp = timestamp - 1500L; + pumpID.timestamp = timestamp; MainApp.getDbHelper().createOrUpdate(pumpID); TemporaryBasal temporaryBasal = new TemporaryBasal(getInjector()); temporaryBasal.durationInMinutes = 0; temporaryBasal.source = Source.PUMP; temporaryBasal.pumpId = pumpID.id; - temporaryBasal.date = timestamp; + temporaryBasal.date = timestamp - 1500L; temporaryBasals.add(temporaryBasal); }