From e14272c083127739e760d0414ca3eb40cca0dcb6 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 12 Dec 2017 18:18:41 +0100 Subject: [PATCH] Rv2,RS: always load last 45 min --- .../androidaps/plugins/PumpDanaRS/services/DanaRSService.java | 2 +- .../plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java index f927c107f1..a30e237672 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java @@ -185,7 +185,7 @@ public class DanaRSService extends Service { while (!msg.done && bleComm.isConnected()) { SystemClock.sleep(100); } - lastHistoryFetched = DanaRS_Packet_APS_History_Events.lastEventTimeLoaded; + lastHistoryFetched = DanaRS_Packet_APS_History_Events.lastEventTimeLoaded - 45 * 60 * 1000L; // always load last 45 min log.debug("Events loaded"); return new PumpEnactResult().success(true); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java index 2020e6d14d..4e5b85177a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java @@ -527,7 +527,7 @@ public class DanaRv2ExecutionService extends Service { waitMsec(100); } waitMsec(200); - lastHistoryFetched = MsgHistoryEvents_v2.lastEventTimeLoaded; + lastHistoryFetched = MsgHistoryEvents_v2.lastEventTimeLoaded - 45 * 60 * 1000L; //always load last 45 min; return new PumpEnactResult().success(true); }