As Adrian asked .... Profile.toMgDl()
This commit is contained in:
parent
f3a12be0be
commit
e923bf2156
1 changed files with 6 additions and 6 deletions
|
@ -261,12 +261,12 @@ 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 ? eatingSoonTT*Constants.MMOLL_TO_MGDL : 90d;
|
esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,Constants.MGDL) : 90d;
|
||||||
tt = prefTT > 0 ? prefTT*Constants.MMOLL_TO_MGDL : 140d;
|
tt = prefTT > 0 ? Profile.toMgdl(prefTT,Constants.MGDL) : 140d;
|
||||||
} else
|
} else {
|
||||||
esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d;
|
esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d;
|
||||||
tt = prefTT > 0 ? prefTT : 140d;
|
tt = prefTT > 0 ? prefTT : 140d;
|
||||||
|
}
|
||||||
|
|
||||||
if (startActivityTTCheckbox.isChecked()) {
|
if (startActivityTTCheckbox.isChecked()) {
|
||||||
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
||||||
|
|
Loading…
Reference in a new issue