Fix pump unreachable alert
This commit is contained in:
parent
12612c2d1e
commit
d9e08530fd
1 changed files with 4 additions and 3 deletions
|
@ -23,9 +23,6 @@ import org.slf4j.LoggerFactory
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
class KeepAliveReceiver : BroadcastReceiver() {
|
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) {
|
override fun onReceive(context: Context, rIntent: Intent) {
|
||||||
if (L.isEnabled(L.CORE))
|
if (L.isEnabled(L.CORE))
|
||||||
|
@ -47,6 +44,10 @@ class KeepAliveReceiver : BroadcastReceiver() {
|
||||||
private val STATUS_UPDATE_FREQUENCY = T.mins(15).msecs()
|
private val STATUS_UPDATE_FREQUENCY = T.mins(15).msecs()
|
||||||
private val IOB_UPDATE_FREQUENCY = T.mins(5).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
|
//called by MainApp at first app start
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setAlarm(context: Context) {
|
fun setAlarm(context: Context) {
|
||||||
|
|
Loading…
Reference in a new issue