snooze carb alerts for 15 min after treatments
This commit is contained in:
parent
28f2630a91
commit
8aabf15dfe
1 changed files with 8 additions and 0 deletions
|
@ -337,6 +337,14 @@ public class LoopPlugin extends PluginBase implements LoopInterface {
|
||||||
}
|
}
|
||||||
return isDisconnected;
|
return isDisconnected;
|
||||||
}
|
}
|
||||||
|
public boolean treatmentTimethreshold(int duartionMinutes) {
|
||||||
|
long threshold = System.currentTimeMillis() + (duartionMinutes*60*1000);
|
||||||
|
boolean bool = false;
|
||||||
|
if (treatmentsPlugin.getLastBolusTime() > threshold || treatmentsPlugin.getLastCarbTime() > threshold)
|
||||||
|
bool = true;
|
||||||
|
|
||||||
|
return bool;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void invoke(String initiator, boolean allowNotification) {
|
public synchronized void invoke(String initiator, boolean allowNotification) {
|
||||||
invoke(initiator, allowNotification, false);
|
invoke(initiator, allowNotification, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue