Revert "Only do SMB if invoke is from EventNewBG"
This reverts commit 6ef4b0c2a9
This commit is contained in:
parent
6ef4b0c2a9
commit
60990e500e
1 changed files with 1 additions and 6 deletions
|
@ -260,12 +260,7 @@ public class LoopPlugin implements PluginBase {
|
||||||
// check rate for constrais
|
// check rate for constrais
|
||||||
final APSResult resultAfterConstraints = result.clone();
|
final APSResult resultAfterConstraints = result.clone();
|
||||||
resultAfterConstraints.rate = constraintsInterface.applyBasalConstraints(resultAfterConstraints.rate);
|
resultAfterConstraints.rate = constraintsInterface.applyBasalConstraints(resultAfterConstraints.rate);
|
||||||
if(initiator == "EventNewBG") {
|
resultAfterConstraints.smb = constraintsInterface.applyBolusConstraints(resultAfterConstraints.smb);
|
||||||
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();
|
if (lastRun == null) lastRun = new LastRun();
|
||||||
lastRun.request = result;
|
lastRun.request = result;
|
||||||
|
|
Loading…
Reference in a new issue