Merge pull request #1669 from harispoljo/feature-TTRunLoop
[Enhancement] Run loop when TemporyTarget is changed
This commit is contained in:
commit
592d04af1d
1 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,7 @@ import info.nightscout.androidaps.db.DatabaseHelper;
|
|||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventTempTargetChange;
|
||||
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
|
@ -175,6 +176,14 @@ public class LoopPlugin extends PluginBase {
|
|||
return loopSuspendedTill;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventTempTargetChange ev) {
|
||||
new Thread(() -> invoke("EventTempTargetChange", true)).start();
|
||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("TT_Loop_Run"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void suspendTo(long endTime) {
|
||||
loopSuspendedTill = endTime;
|
||||
isSuperBolus = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue