Smooting: use recalculated in watch graph
This commit is contained in:
parent
0f5d3b5813
commit
1b338b30ab
|
@ -115,7 +115,7 @@ class DataBroadcastPlugin @Inject constructor(
|
||||||
val lastBG = iobCobCalculator.ads.lastBg() ?: return
|
val lastBG = iobCobCalculator.ads.lastBg() ?: return
|
||||||
val glucoseStatus = glucoseStatusProvider.glucoseStatusData ?: return
|
val glucoseStatus = glucoseStatusProvider.glucoseStatusData ?: return
|
||||||
|
|
||||||
bundle.putDouble("glucoseMgdl", lastBG.value) // last BG in mgdl
|
bundle.putDouble("glucoseMgdl", lastBG.recalculated) // last BG in mgdl
|
||||||
bundle.putLong("glucoseTimeStamp", lastBG.timestamp) // timestamp
|
bundle.putLong("glucoseTimeStamp", lastBG.timestamp) // timestamp
|
||||||
bundle.putString("units", profileFunction.getUnits().asText) // units used in AAPS "mg/dl" or "mmol"
|
bundle.putString("units", profileFunction.getUnits().asText) // units used in AAPS "mg/dl" or "mmol"
|
||||||
bundle.putString("slopeArrow", lastBG.trendArrow.text) // direction arrow as string
|
bundle.putString("slopeArrow", lastBG.trendArrow.text) // direction arrow as string
|
||||||
|
|
|
@ -948,8 +948,8 @@ class DataHandlerMobile @Inject constructor(
|
||||||
slopeArrow = trendCalculator.getTrendArrow(glucoseValue).symbol,
|
slopeArrow = trendCalculator.getTrendArrow(glucoseValue).symbol,
|
||||||
delta = glucoseStatus?.let { deltaString(it.delta, it.delta * Constants.MGDL_TO_MMOLL, units) } ?: "--",
|
delta = glucoseStatus?.let { deltaString(it.delta, it.delta * Constants.MGDL_TO_MMOLL, units) } ?: "--",
|
||||||
avgDelta = glucoseStatus?.let { deltaString(it.shortAvgDelta, it.shortAvgDelta * Constants.MGDL_TO_MMOLL, units) } ?: "--",
|
avgDelta = glucoseStatus?.let { deltaString(it.shortAvgDelta, it.shortAvgDelta * Constants.MGDL_TO_MMOLL, units) } ?: "--",
|
||||||
sgvLevel = if (glucoseValue.value > highLine) 1L else if (glucoseValue.value < lowLine) -1L else 0L,
|
sgvLevel = if (glucoseValue.recalculated > highLine) 1L else if (glucoseValue.recalculated < lowLine) -1L else 0L,
|
||||||
sgv = glucoseValue.value,
|
sgv = glucoseValue.recalculated,
|
||||||
high = highLine,
|
high = highLine,
|
||||||
low = lowLine,
|
low = lowLine,
|
||||||
color = 0
|
color = 0
|
||||||
|
|
|
@ -192,7 +192,7 @@ class CarbsDialog : DialogFragmentWithDate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
iobCobCalculator.ads.actualBg()?.let { bgReading ->
|
iobCobCalculator.ads.actualBg()?.let { bgReading ->
|
||||||
if (bgReading.value < 72)
|
if (bgReading.recalculated < 72)
|
||||||
binding.hypoTt.isChecked = true
|
binding.hypoTt.isChecked = true
|
||||||
}
|
}
|
||||||
binding.hypoTt.setOnClickListener {
|
binding.hypoTt.setOnClickListener {
|
||||||
|
|
Loading…
Reference in a new issue