Revert "Only do SMB if invoke is from EventNewBG"
This reverts commit 6ef4b0c2a9
This commit is contained in:
parent
6ef4b0c2a9
commit
60990e500e
|
@ -260,12 +260,7 @@ public class LoopPlugin implements PluginBase {
|
|||
// check rate for constrais
|
||||
final APSResult resultAfterConstraints = result.clone();
|
||||
resultAfterConstraints.rate = constraintsInterface.applyBasalConstraints(resultAfterConstraints.rate);
|
||||
if(initiator == "EventNewBG") {
|
||||
resultAfterConstraints.smb = constraintsInterface.applyBolusConstraints(resultAfterConstraints.smb);
|
||||
} else {
|
||||
log.debug("Loop is not invoked by EventNewBG so SMB is 0("+constraintsInterface.applyBolusConstraints(resultAfterConstraints.smb)+")");
|
||||
resultAfterConstraints.smb = 0.0;
|
||||
}
|
||||
|
||||
if (lastRun == null) lastRun = new LastRun();
|
||||
lastRun.request = result;
|
||||
|
|
Loading…
Reference in a new issue