Revert "Only do SMB if invoke is from EventNewBG"

This reverts commit 6ef4b0c2a9
This commit is contained in:
Milos Kozak 2017-09-18 21:28:43 +00:00
parent 6ef4b0c2a9
commit 60990e500e

View file

@ -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;