Fix Unit convertion mmol->mgdl and mgdl->mmol for csv file

This commit is contained in:
Philoul 2021-11-29 21:59:08 +01:00
parent 6095a29595
commit 90e2c8f65f

View file

@ -205,10 +205,10 @@ class UserEntryPresentationHelper @Inject constructor(
is ValueWithUnit.Timestamp -> timestamp = dateUtil.dateAndTimeAndSecondsString(valueWithUnit.value)
is ValueWithUnit.Mgdl ->
bg = Profile.toUnitsString(valueWithUnit.value, valueWithUnit.value * Constants.MMOLL_TO_MGDL, profileFunction.getUnits())
bg = Profile.toUnitsString(valueWithUnit.value, valueWithUnit.value * Constants.MGDL_TO_MMOLL, profileFunction.getUnits())
is ValueWithUnit.Mmoll ->
bg = Profile.toUnitsString(valueWithUnit.value, valueWithUnit.value * Constants.MMOLL_TO_MGDL, profileFunction.getUnits())
bg = Profile.toUnitsString(valueWithUnit.value * Constants.MMOLL_TO_MGDL, valueWithUnit.value , profileFunction.getUnits())
ValueWithUnit.UNKNOWN -> Unit
}