prevent missing pump status in NS
This commit is contained in:
parent
007df3aab3
commit
b7221aa286
3 changed files with 3 additions and 3 deletions
|
@ -326,7 +326,7 @@ public abstract class PumpPluginAbstract extends PumpPluginBase implements PumpI
|
||||||
@NonNull @Override
|
@NonNull @Override
|
||||||
public JSONObject getJSONStatus(Profile profile, String profileName, String version) {
|
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();
|
return new JSONObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
|
||||||
public JSONObject getJSONStatus(Profile profile, String profilename, String version) {
|
public JSONObject getJSONStatus(Profile profile, String profilename, String version) {
|
||||||
DanaPump pump = danaPump;
|
DanaPump pump = danaPump;
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (pump.getLastConnection() + 5 * 60 * 1000L < System.currentTimeMillis()) {
|
if (pump.getLastConnection() + 60 * 60 * 1000L < System.currentTimeMillis()) {
|
||||||
return new JSONObject();
|
return new JSONObject();
|
||||||
}
|
}
|
||||||
JSONObject pumpjson = new JSONObject();
|
JSONObject pumpjson = new JSONObject();
|
||||||
|
|
|
@ -567,7 +567,7 @@ class DanaRSPlugin @Inject constructor(
|
||||||
|
|
||||||
override fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject {
|
override fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject {
|
||||||
val now = System.currentTimeMillis()
|
val now = System.currentTimeMillis()
|
||||||
if (danaPump.lastConnection + 5 * 60 * 1000L < System.currentTimeMillis()) {
|
if (danaPump.lastConnection + 60 * 60 * 1000L < System.currentTimeMillis()) {
|
||||||
return JSONObject()
|
return JSONObject()
|
||||||
}
|
}
|
||||||
val pumpJson = JSONObject()
|
val pumpJson = JSONObject()
|
||||||
|
|
Loading…
Reference in a new issue