From e923bf21560d354cd69028fe23b46f324ac5eedb Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Fri, 2 Mar 2018 15:09:03 +0200 Subject: [PATCH] As Adrian asked .... Profile.toMgDl() --- .../plugins/Overview/Dialogs/NewCarbsDialog.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java index cbe6575809..d6254fd443 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java @@ -261,12 +261,12 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D if(currentProfile == null) return; if(currentProfile.getUnits().equals(Constants.MMOL)) { - esTT = eatingSoonTT > 0 ? eatingSoonTT*Constants.MMOLL_TO_MGDL : 90d; - tt = prefTT > 0 ? prefTT*Constants.MMOLL_TO_MGDL : 140d; - } else - esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d; - tt = prefTT > 0 ? prefTT : 140d; - + esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,Constants.MGDL) : 90d; + tt = prefTT > 0 ? Profile.toMgdl(prefTT,Constants.MGDL) : 140d; + } else { + esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d; + tt = prefTT > 0 ? prefTT : 140d; + } if (startActivityTTCheckbox.isChecked()) { if(currentProfile.getUnits().equals(Constants.MMOL)) {