show recalculated value in notification and sms
This commit is contained in:
parent
fede765a40
commit
ef3a8fbffa
2 changed files with 3 additions and 3 deletions
|
@ -124,7 +124,7 @@ class PersistentNotificationPlugin @Inject constructor(
|
||||||
val lastBG = iobCobCalculator.ads.lastBg()
|
val lastBG = iobCobCalculator.ads.lastBg()
|
||||||
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
|
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
|
||||||
if (lastBG != null) {
|
if (lastBG != null) {
|
||||||
line1aa = profileUtil.fromMgdlToStringInUnits(lastBG.value)
|
line1aa = profileUtil.fromMgdlToStringInUnits(lastBG.recalculated)
|
||||||
line1 = line1aa
|
line1 = line1aa
|
||||||
if (glucoseStatus != null) {
|
if (glucoseStatus != null) {
|
||||||
line1 += (" Δ" + profileUtil.fromMgdlToSignedStringInUnits(glucoseStatus.delta)
|
line1 += (" Δ" + profileUtil.fromMgdlToSignedStringInUnits(glucoseStatus.delta)
|
||||||
|
|
|
@ -356,11 +356,11 @@ class SmsCommunicatorPlugin @Inject constructor(
|
||||||
var reply = ""
|
var reply = ""
|
||||||
val units = profileUtil.units
|
val units = profileUtil.units
|
||||||
if (actualBG != null) {
|
if (actualBG != null) {
|
||||||
reply = rh.gs(R.string.sms_actual_bg) + " " + profileUtil.fromMgdlToStringInUnits(actualBG.value) + ", "
|
reply = rh.gs(R.string.sms_actual_bg) + " " + profileUtil.fromMgdlToStringInUnits(actualBG.recalculated) + ", "
|
||||||
} else if (lastBG != null) {
|
} else if (lastBG != null) {
|
||||||
val agoMilliseconds = dateUtil.now() - lastBG.timestamp
|
val agoMilliseconds = dateUtil.now() - lastBG.timestamp
|
||||||
val agoMin = (agoMilliseconds / 60.0 / 1000.0).toInt()
|
val agoMin = (agoMilliseconds / 60.0 / 1000.0).toInt()
|
||||||
reply = rh.gs(R.string.sms_last_bg) + " " + profileUtil.valueInCurrentUnitsDetect(lastBG.value) + " " + rh.gs(R.string.sms_min_ago, agoMin) + ", "
|
reply = rh.gs(R.string.sms_last_bg) + " " + profileUtil.valueInCurrentUnitsDetect(lastBG.recalculated) + " " + rh.gs(R.string.sms_min_ago, agoMin) + ", "
|
||||||
}
|
}
|
||||||
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
|
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
|
||||||
if (glucoseStatus != null) reply += rh.gs(R.string.sms_delta) + " " + profileUtil.fromMgdlToUnits(glucoseStatus.delta) + " " + units + ", "
|
if (glucoseStatus != null) reply += rh.gs(R.string.sms_delta) + " " + profileUtil.fromMgdlToUnits(glucoseStatus.delta) + " " + units + ", "
|
||||||
|
|
Loading…
Reference in a new issue