BolusWizard use 0 for insulin correction if in range
This commit is contained in:
parent
771f9eac1a
commit
a5c4495a5d
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ public class BolusWizard {
|
|||
targetBGLow = Profile.fromMgdlToUnits(tempTarget.low, specificProfile.getUnits());
|
||||
targetBGHigh = Profile.fromMgdlToUnits(tempTarget.high, specificProfile.getUnits());
|
||||
}
|
||||
if (bg <= targetBGLow) {
|
||||
if (bg >= targetBGLow && bg <= targetBGHigh) {
|
||||
bgDiff = 0d;
|
||||
} else if (bg <= targetBGLow) {
|
||||
bgDiff = bg - targetBGLow;
|
||||
} else {
|
||||
bgDiff = bg - targetBGHigh;
|
||||
|
|
Loading…
Reference in a new issue