fix displaying target in mmol
This commit is contained in:
parent
4f54b7ba81
commit
6b8dd5868d
1 changed files with 3 additions and 2 deletions
|
@ -393,8 +393,9 @@ public class Profile {
|
||||||
else return DecimalFormatter.to1Decimal(valueInMmol);
|
else return DecimalFormatter.to1Decimal(valueInMmol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// targets are stored in mg/dl
|
||||||
public static String toTargetRangeString(double low, double high, String units) {
|
public static String toTargetRangeString(double low, double high, String units) {
|
||||||
if (low == high) return toUnitsString(low, low, units);
|
if (low == high) return toUnitsString(low, Profile.fromMgdlToUnits(low, Constants.MMOL), units);
|
||||||
else return toUnitsString(low, low, units) + " - " + toUnitsString(high, high, units);
|
else return toUnitsString(low, Profile.fromMgdlToUnits(low, Constants.MMOL), units) + " - " + toUnitsString(high, Profile.fromMgdlToUnits(high, Constants.MMOL), units);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue