From 841141cd20cd6843f89904226f1e48044da28a6d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 11 Sep 2016 13:32:21 +0200 Subject: [PATCH] recheck pump status if older than 30 min before aplly basal --- .../nightscout/androidaps/plugins/DanaR/DanaRPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java index 0864b52d41..e413a2c01a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java @@ -272,6 +272,11 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf // This is called from APS @Override public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes) { + // Recheck pump status if older than 30 min + if (getDanaRPump().lastConnection.getTime() + 30 * 60 * 1000L < new Date().getTime()) { + doConnect("setTempBasalAbsolute old data"); + } + PumpEnactResult result = new PumpEnactResult(); ConfigBuilderPlugin configBuilderPlugin = MainApp.getConfigBuilder();