From 17b9a4b951c14037c9f4394c5a09a0e19cc7b83c Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 13 Aug 2018 23:58:07 +0200 Subject: [PATCH] add logging --- .../nightscout/androidaps/receivers/KeepAliveReceiver.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java index 9268198aca..2b928b5cc1 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java @@ -21,6 +21,7 @@ import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions; import info.nightscout.androidaps.queue.commands.Command; +import info.nightscout.utils.DateUtil; import info.nightscout.utils.FabricPrivacy; import info.nightscout.utils.LocalAlertUtils; @@ -63,6 +64,8 @@ public class KeepAliveReceiver extends BroadcastReceiver { boolean isStatusOutdated = lastConnection.getTime() + STATUS_UPDATE_FREQUENCY < System.currentTimeMillis(); boolean isBasalOutdated = Math.abs(profile.getBasal() - pump.getBaseBasalRate()) > pump.getPumpDescription().basalStep; + if (L.isEnabled(L.CORE)) + log.debug("Last connection: " + DateUtil.dateAndTimeString(lastConnection)); LocalAlertUtils.checkPumpUnreachableAlarm(lastConnection, isStatusOutdated); if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {