From d9e08530fddc8cb9e07bcb3fd115ccb705aa8d94 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 17 Mar 2020 17:58:50 +0100 Subject: [PATCH] Fix pump unreachable alert --- .../nightscout/androidaps/receivers/KeepAliveReceiver.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.kt index 7ca4f962ae..40a9088497 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.kt @@ -23,9 +23,6 @@ import org.slf4j.LoggerFactory import kotlin.math.abs class KeepAliveReceiver : BroadcastReceiver() { - private var lastReadStatus: Long = 0 - private var lastRun: Long = 0 - private var lastIobUpload: Long = 0 override fun onReceive(context: Context, rIntent: Intent) { if (L.isEnabled(L.CORE)) @@ -47,6 +44,10 @@ class KeepAliveReceiver : BroadcastReceiver() { private val STATUS_UPDATE_FREQUENCY = T.mins(15).msecs() private val IOB_UPDATE_FREQUENCY = T.mins(5).msecs() + private var lastReadStatus: Long = 0 + private var lastRun: Long = 0 + private var lastIobUpload: Long = 0 + //called by MainApp at first app start @JvmStatic fun setAlarm(context: Context) {