better info in wizard confirmation dialog
This commit is contained in:
parent
afa654f3b9
commit
2e2c9c5d8f
|
@ -241,8 +241,10 @@ class BolusWizard @JvmOverloads constructor(val profile: Profile,
|
|||
private fun confirmMessageAfterConstraints(pump: PumpInterface): String {
|
||||
|
||||
var confirmMessage = MainApp.gs(R.string.entertreatmentquestion)
|
||||
if (insulinAfterConstraints > 0)
|
||||
confirmMessage += "<br/>" + MainApp.gs(R.string.bolus) + ": " + "<font color='" + MainApp.gc(R.color.bolus) + "'>" + DecimalFormatter.toPumpSupportedBolus(insulinAfterConstraints) + "U" + "</font>"
|
||||
if (insulinAfterConstraints > 0) {
|
||||
val pct = if (percentageCorrection != 100.0) " (" + percentageCorrection.toInt() + "%)" else ""
|
||||
confirmMessage += "<br/>" + MainApp.gs(R.string.bolus) + ": " + "<font color='" + MainApp.gc(R.color.bolus) + "'>" + DecimalFormatter.toPumpSupportedBolus(insulinAfterConstraints) + "U" + pct + "</font>"
|
||||
}
|
||||
if (carbs > 0) {
|
||||
var timeShift = ""
|
||||
if (carbTime > 0) {
|
||||
|
@ -253,7 +255,7 @@ class BolusWizard @JvmOverloads constructor(val profile: Profile,
|
|||
confirmMessage += "<br/>" + MainApp.gs(R.string.carbs) + ": " + "<font color='" + MainApp.gc(R.color.carbs) + "'>" + carbs + "g" + timeShift + "</font>"
|
||||
}
|
||||
if (insulinFromCOB > 0) {
|
||||
confirmMessage += "<br/>" + MainApp.gs(R.string.insulinFromCob, MainApp.gc(R.color.cobAlert), cob, insulinFromCOB)
|
||||
confirmMessage += "<br/>" + MainApp.gs(R.string.insulinFromCob, MainApp.gc(R.color.cobAlert), insulinFromBolusIOB + insulinFromBasalsIOB + insulinFromCOB + insulinFromBG)
|
||||
val absorptionRate = IobCobCalculatorPlugin.getPlugin().slowAbsorptionPercentage(60)
|
||||
if (absorptionRate > .25)
|
||||
confirmMessage += "<br/>" + MainApp.gs(R.string.slowabsorptiondetected, MainApp.gc(R.color.cobAlert), (absorptionRate * 100).toInt())
|
||||
|
|
|
@ -1598,7 +1598,7 @@
|
|||
<string name="medtronic_cmd_desc_set_bolus">Set Bolus</string>
|
||||
|
||||
|
||||
<string name="insulinFromCob"><![CDATA[COB insulin: <font color=\'%1$s\'>%2$.1fg %3$.2fU</font>]]></string>
|
||||
<string name="insulinFromCob"><![CDATA[COB vs IOB: <font color=\'%1$s\'>%2$+.2fU</font>]]></string>
|
||||
<string name="bolusconstraintappliedwarning"><![CDATA[<font color=\'%1$s\'>Bolus constraint applied: %2$.2fU to %3$.2fU</font>]]></string>
|
||||
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! Slow carbs absorption detected: %2$d%% of time. Double check your calculation. COB can be overestimated thus more insulin could be given !!!!!</font>]]></string>
|
||||
<string name="reservoirvalue">%1$.0f / %2$d U</string>
|
||||
|
|
Loading…
Reference in a new issue