From d58eca878086012b364d695fe2d9eb0d6908046d Mon Sep 17 00:00:00 2001 From: Philoul Date: Sat, 30 Sep 2023 17:01:05 +0200 Subject: [PATCH] Wear Include Double values into SingleBg for delta and avgDelta --- .../kotlin/app/aaps/core/interfaces/rx/weardata/EventData.kt | 4 +++- .../main/general/wear/wearintegration/DataHandlerMobile.kt | 4 +++- wear/src/main/kotlin/app/aaps/wear/data/RawDisplayData.kt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/EventData.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/EventData.kt index 548e4b071b..e20a0796b9 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/EventData.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/EventData.kt @@ -186,7 +186,9 @@ sealed class EventData : Event() { val sgv: Double, val high: Double, // highLine val low: Double, // lowLine - val color: Int = 0 + val color: Int = 0, + val deltaMgdl: Double? = null, + val avgDeltaMgdl: Double? = null ) : EventData(), Comparable { override fun equals(other: Any?): Boolean = diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt index e742bd3728..c45bd99c33 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/wear/wearintegration/DataHandlerMobile.kt @@ -986,7 +986,9 @@ class DataHandlerMobile @Inject constructor( sgv = glucoseValue.recalculated, high = highLine, low = lowLine, - color = 0 + color = 0, + deltaMgdl = glucoseStatus?.delta, + avgDeltaMgdl = glucoseStatus?.shortAvgDelta ) } diff --git a/wear/src/main/kotlin/app/aaps/wear/data/RawDisplayData.kt b/wear/src/main/kotlin/app/aaps/wear/data/RawDisplayData.kt index 14678b2135..3bdcf98344 100644 --- a/wear/src/main/kotlin/app/aaps/wear/data/RawDisplayData.kt +++ b/wear/src/main/kotlin/app/aaps/wear/data/RawDisplayData.kt @@ -27,7 +27,9 @@ class RawDisplayData { sgv = 0.0, high = 0.0, low = 0.0, - color = 0 + color = 0, + deltaMgdl = null, + avgDeltaMgdl = null ) // status bundle