added snoozing if bgReadingAgo is smaller than threshold

This commit is contained in:
RoumenGeorgiev 2017-08-07 18:53:56 +03:00 committed by GitHub
parent 4f054907cb
commit 1dd9086924

View file

@ -1,3 +1,4 @@
package info.nightscout.androidaps.plugins.Overview;
import java.util.Date;
@ -174,6 +175,9 @@ public class Notification {
if((bgReadingAgoMin > threshold && SP.getBoolean(R.string.key_nsalarm_staledata, false))||(bgReadingAgoMin > threshold && openAPSEnabledAlerts)){
return true;
}
//snoozing for threshold
SP.putLong("snoozedTo", (long) (bgReading.date+(threshold*1000*60L)));
//log.debug("New bg data is available Alarm is snoozed for next "+threshold*1000*60+" seconds");
return false;
}
}