From 4d356096cf7dd80fb6176285b13c3caef8333030 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 8 Dec 2017 19:23:41 +0100 Subject: [PATCH] Check pump time not last connection time --- .../nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 38b9757d4b..e5d14a07c6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -710,7 +710,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf /** check pump time (main menu) and raise notification if clock is off by more than 2m * (setting clock is not supported by ruffy) */ private void checkPumpTime(PumpState state) { - if (state.timestamp != 0 && Math.abs(state.timestamp - System.currentTimeMillis()) > 2 * 60 * 1000) { + if (state.pumpTime != 0 && Math.abs(state.pumpTime - System.currentTimeMillis()) > 2 * 60 * 1000) { Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, MainApp.sResources.getString(R.string.combo_notification_check_time_date), Notification.NORMAL); MainApp.bus().post(new EventNewNotification(notification)); } @@ -1025,4 +1025,4 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf public Double applyMaxIOBConstraints(Double maxIob) { return lowSuspendOnlyLoopEnforcetTill < System.currentTimeMillis() ? maxIob : 0; } -} \ No newline at end of file +}