From b7221aa2861ed70281155ca71d76add899e436f3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 27 Jul 2020 15:21:36 +0200 Subject: [PATCH] prevent missing pump status in NS --- .../androidaps/plugins/pump/common/PumpPluginAbstract.java | 2 +- .../info/nightscout/androidaps/danar/AbstractDanaRPlugin.java | 2 +- .../main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.java index 6227d2ea2a..b16031a14f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.java @@ -326,7 +326,7 @@ public abstract class PumpPluginAbstract extends PumpPluginBase implements PumpI @NonNull @Override public JSONObject getJSONStatus(Profile profile, String profileName, String version) { - if ((getPumpStatusData().lastConnection + 5 * 60 * 1000L) < System.currentTimeMillis()) { + if ((getPumpStatusData().lastConnection + 60 * 60 * 1000L) < System.currentTimeMillis()) { return new JSONObject(); } diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java b/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java index df191419c1..f048c101ff 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java +++ b/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java @@ -370,7 +370,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump public JSONObject getJSONStatus(Profile profile, String profilename, String version) { DanaPump pump = danaPump; long now = System.currentTimeMillis(); - if (pump.getLastConnection() + 5 * 60 * 1000L < System.currentTimeMillis()) { + if (pump.getLastConnection() + 60 * 60 * 1000L < System.currentTimeMillis()) { return new JSONObject(); } JSONObject pumpjson = new JSONObject(); diff --git a/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt b/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt index 7619c7515a..291f2d3b9b 100644 --- a/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt +++ b/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt @@ -567,7 +567,7 @@ class DanaRSPlugin @Inject constructor( override fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject { val now = System.currentTimeMillis() - if (danaPump.lastConnection + 5 * 60 * 1000L < System.currentTimeMillis()) { + if (danaPump.lastConnection + 60 * 60 * 1000L < System.currentTimeMillis()) { return JSONObject() } val pumpJson = JSONObject()