Show current total
The total of the calculation in the wizard was showing the value from the previous calculation when you enable/disable to include Bolus-IOB or Basal-IOB into the calculation. The button to send to the pump showed the current amount of units.
This commit is contained in:
parent
6d6987e7f9
commit
2294093aab
1 changed files with 2 additions and 2 deletions
|
@ -378,6 +378,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
|||
basalIobInsulin.setText(DecimalFormatter.to2Decimal(wizard.insulingFromBasalsIOB) + "U");
|
||||
|
||||
correctionInsulin.setText(DecimalFormatter.to2Decimal(wizard.insulinFromCorrection) + "U");
|
||||
calculatedTotalInsulin = wizard.calculatedTotalInsulin;
|
||||
|
||||
if (calculatedTotalInsulin < 0) {
|
||||
total.setText(getString(R.string.missing) + " " + DecimalFormatter.to0Decimal(wizard.carbsEquivalent) + "g");
|
||||
|
@ -388,7 +389,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
|||
}
|
||||
|
||||
calculatedCarbs = carbsAfterConstraint;
|
||||
calculatedTotalInsulin = wizard.calculatedTotalInsulin;
|
||||
|
||||
if (calculatedTotalInsulin > 0d || calculatedCarbs > 0d) {
|
||||
String insulinText = calculatedTotalInsulin > 0d ? (DecimalFormatter.to2Decimal(calculatedTotalInsulin) + "U") : "";
|
||||
|
@ -422,4 +422,4 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue