propper conversion from MMOL to MgDl
This commit is contained in:
parent
6c75b1b317
commit
ea29b6ad82
|
@ -261,8 +261,8 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
|
||||||
if(currentProfile == null)
|
if(currentProfile == null)
|
||||||
return;
|
return;
|
||||||
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
||||||
esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,Constants.MGDL) : 90d;
|
esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,Constants.MMOL) : 90d;
|
||||||
activityTT = prefTT > 0 ? Profile.toMgdl(prefTT,Constants.MGDL) : 140d;
|
activityTT = prefTT > 0 ? Profile.toMgdl(prefTT,Constants.MMOL) : 140d;
|
||||||
} else {
|
} else {
|
||||||
esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d;
|
esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d;
|
||||||
activityTT = prefTT > 0 ? prefTT : 140d;
|
activityTT = prefTT > 0 ? prefTT : 140d;
|
||||||
|
|
|
@ -250,7 +250,7 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener,
|
||||||
if(currentProfile == null)
|
if(currentProfile == null)
|
||||||
return;
|
return;
|
||||||
if(currentProfile.getUnits().equals(Constants.MMOL))
|
if(currentProfile.getUnits().equals(Constants.MMOL))
|
||||||
tt = prefTT > 0 ? Profile.toMgdl(prefTT, Constants.MGDL) : 80d;
|
tt = prefTT > 0 ? Profile.toMgdl(prefTT, Constants.MMOL) : 80d;
|
||||||
else
|
else
|
||||||
tt = prefTT > 0 ? prefTT : 80d;
|
tt = prefTT > 0 ? prefTT : 80d;
|
||||||
final double finalTT = tt;
|
final double finalTT = tt;
|
||||||
|
|
Loading…
Reference in a new issue