chore: use long label for profile configuration
This commit is contained in:
parent
7410333177
commit
e71bf3f69b
3 changed files with 16 additions and 12 deletions
|
@ -134,22 +134,22 @@ class LocalProfileFragment : DaggerFragment() {
|
|||
binding.name.addTextChangedListener(textWatch)
|
||||
binding.dia.setParams(currentProfile.dia, hardLimits.minDia(), hardLimits.maxDia(), 0.1, DecimalFormat("0.0"), false, null, textWatch)
|
||||
binding.dia.tag = "LP_DIA"
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.ic_holder, "IC", rh.gs(R.string.ic_label), currentProfile.ic, null, doubleArrayOf(hardLimits.minIC(), hardLimits.maxIC()), null, 0.1, DecimalFormat ("0.0"), save)
|
||||
basalView = TimeListEdit(context, aapsLogger, dateUtil, view, R.id.basal_holder, "BASAL", rh.gs(R.string.basal_label) + ": " + sumLabel(), currentProfile.basal, null, doubleArrayOf(pumpDescription.basalMinimumRate, pumpDescription.basalMaximumRate), null, 0.01, DecimalFormat("0.00"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.ic_holder, "IC", rh.gs(R.string.ic_long_label), currentProfile.ic, null, doubleArrayOf(hardLimits.minIC(), hardLimits.maxIC()), null, 0.1, DecimalFormat ("0.0"), save)
|
||||
basalView = TimeListEdit(context, aapsLogger, dateUtil, view, R.id.basal_holder, "BASAL", rh.gs(R.string.basal_long_label) + ": " + sumLabel(), currentProfile.basal, null, doubleArrayOf(pumpDescription.basalMinimumRate, pumpDescription.basalMaximumRate), null, 0.01, DecimalFormat("0.00"), save)
|
||||
if (units == Constants.MGDL) {
|
||||
val isfRange = doubleArrayOf(HardLimits.MIN_ISF, HardLimits.MAX_ISF)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_label), currentProfile.isf, null, isfRange , null, 1.0, DecimalFormat("0"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_label), currentProfile.targetLow, currentProfile.targetHigh, HardLimits.VERY_HARD_LIMIT_MIN_BG, HardLimits.VERY_HARD_LIMIT_TARGET_BG, 1.0, DecimalFormat("0"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null, isfRange , null, 1.0, DecimalFormat("0"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_long_label), currentProfile.targetLow, currentProfile.targetHigh, HardLimits.VERY_HARD_LIMIT_MIN_BG, HardLimits.VERY_HARD_LIMIT_TARGET_BG, 1.0, DecimalFormat("0"), save)
|
||||
} else {
|
||||
val isfRange = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.MIN_ISF, GlucoseUnit.MMOL)),
|
||||
roundDown(Profile.fromMgdlToUnits(HardLimits.MAX_ISF, GlucoseUnit.MMOL)))
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_label), currentProfile.isf, null,isfRange , null, 0.1, DecimalFormat("0.0"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.isf_holder, "ISF", rh.gs(R.string.isf_long_label), currentProfile.isf, null,isfRange , null, 0.1, DecimalFormat("0.0"), save)
|
||||
val range1 = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[0], GlucoseUnit.MMOL)),
|
||||
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MIN_BG[1], GlucoseUnit.MMOL)))
|
||||
val range2 = doubleArrayOf(roundUp(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[0], GlucoseUnit.MMOL)),
|
||||
roundDown(Profile.fromMgdlToUnits(HardLimits.VERY_HARD_LIMIT_MAX_BG[1], GlucoseUnit.MMOL)))
|
||||
Log.i("TimeListEdit", "build: range1" + range1[0] + " " + range1[1] + " range2" + range2[0] + " " + range2[1])
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_label), currentProfile.targetLow, currentProfile.targetHigh, range1 , range2, 0.1, DecimalFormat("0.0"), save)
|
||||
TimeListEdit(context, aapsLogger, dateUtil, view, R.id.target_holder, "TARGET", rh.gs(R.string.target_long_label), currentProfile.targetLow, currentProfile.targetHigh, range1 , range2, 0.1, DecimalFormat("0.0"), save)
|
||||
}
|
||||
|
||||
// Spinner
|
||||
|
|
|
@ -32,7 +32,6 @@ class IsfProfileGraph : GraphView {
|
|||
val isfSeries: LineGraphSeries<DataPoint> = LineGraphSeries(isfDataPoints)
|
||||
addSeries(isfSeries)
|
||||
isfSeries.thickness = 8
|
||||
isfSeries.isDrawBackground = true
|
||||
viewport.isXAxisBoundsManual = true
|
||||
viewport.setMinX(0.0)
|
||||
viewport.setMaxX(24.0)
|
||||
|
|
|
@ -106,11 +106,16 @@
|
|||
<string name="noprofileset">NO PROFILE SET</string>
|
||||
<string name="date">Date</string>
|
||||
<string name="units_label">Units</string>
|
||||
<string name="dia_label">Duration of Insulin Action</string>
|
||||
<string name="ic_label">Insulin to Carb ratio</string>
|
||||
<string name="isf_label">Insulin Sensitivity Factor</string>
|
||||
<string name="basal_label">Basel rate</string>
|
||||
<string name="target_label">Blood Glucose Target</string>
|
||||
<string name="dia_label">DIA</string>
|
||||
<string name="ic_label">IC</string>
|
||||
<string name="isf_label">ISF</string>
|
||||
<string name="basal_label">Basal</string>
|
||||
<string name="target_label">Target</string>
|
||||
<string name="dia_long_label">Duration of Insulin Action</string>
|
||||
<string name="ic_long_label">Insulin to Carb ratio</string>
|
||||
<string name="isf_long_label">Insulin Sensitivity Factor</string>
|
||||
<string name="basal_long_label">Basel rate</string>
|
||||
<string name="target_long_label">Blood Glucose Target</string>
|
||||
<string name="initializing">Initializing ...</string>
|
||||
<string name="serialnumber">Serial number</string>
|
||||
<string name="battery_label">Battery</string>
|
||||
|
|
Loading…
Reference in a new issue