Use correct units for low/high from TT.

This commit is contained in:
Johannes Mockenhaupt 2017-09-12 01:23:38 +02:00
parent 627cb8e9b2
commit 07b04b8abf
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -67,8 +67,8 @@ public class BolusWizard {
targetBGLow = specificProfile.getTargetLow(); targetBGLow = specificProfile.getTargetLow();
targetBGHigh = specificProfile.getTargetHigh(); targetBGHigh = specificProfile.getTargetHigh();
if (tempTarget != null) { if (tempTarget != null) {
targetBGLow = tempTarget.low; targetBGLow = Profile.fromMgdlToUnits(tempTarget.low, specificProfile.getUnits());
targetBGHigh = tempTarget.high; targetBGHigh = Profile.fromMgdlToUnits(tempTarget.high, specificProfile.getUnits());
} }
if (bg <= targetBGLow) { if (bg <= targetBGLow) {
bgDiff = bg - targetBGLow; bgDiff = bg - targetBGLow;