From 673ae12d206e02168a8a86e394105952879d3608 Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Tue, 31 Dec 2024 14:53:11 +0100 Subject: [PATCH 1/8] very high --- .../kotlin/app/aaps/core/interfaces/overview/LastBgData.kt | 7 +++++++ .../src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt | 1 + .../app/aaps/implementation/overview/LastBgDataImpl.kt | 5 +++++ ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt | 1 + 4 files changed, 14 insertions(+) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/overview/LastBgData.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/overview/LastBgData.kt index 3440f7ec21b..a8a78c61d45 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/overview/LastBgData.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/overview/LastBgData.kt @@ -34,6 +34,13 @@ interface LastBgData { */ fun isHigh(): Boolean + /** + * Is last value above display high very target? + * + * @return true if above + */ + fun isVeryHigh(): Boolean + /** * Evaluate color based on low - in - high * diff --git a/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt b/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt index 75d12c03211..1a44b936e4f 100644 --- a/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt +++ b/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt @@ -19,6 +19,7 @@ enum class UnitDoubleKey( OverviewHypoTarget("hypo_target", 160.0, 108, 180, defaultedBySM = true), OverviewLowMark("low_mark", 72.0, 25, 160, showInNsClientMode = false, hideParentScreenIfHidden = true), OverviewHighMark("high_mark", 180.0, 90, 250, showInNsClientMode = false), + OverviewVeryHighMark("very_high_mark", 240.0, 200, 300, showInNsClientMode = false), ApsLgsThreshold("lgsThreshold", 65.0, 65, 120, defaultedBySM = true, dependency = BooleanKey.ApsUseDynamicSensitivity), ApsAutoIsfSmbDeliveryRatioBgRange("openapsama_smb_delivery_ratio_bg_range", 0.0, 0, 100, defaultedBySM = true) } \ No newline at end of file diff --git a/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt index 04db6298acd..c1b6a169c91 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt @@ -41,6 +41,11 @@ class LastBgDataImpl @Inject constructor( lastBg.valueToUnits(profileFunction.getUnits()) > preferences.get(UnitDoubleKey.OverviewHighMark) } == true + override fun isVeryHigh(): Boolean = + lastBg()?.let { lastBg -> + lastBg.valueToUnits(profileFunction.getUnits()) > preferences.get(UnitDoubleKey.OverviewVeryHighMark) + } == true + @ColorInt override fun lastBgColor(context: Context?): Int = when { diff --git a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt index f5ff2192175..624ed4598f3 100644 --- a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt +++ b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt @@ -144,6 +144,7 @@ class Widget : AppWidgetProvider() { views.setTextColor( R.id.bg, when { lastBgData.isLow() -> rh.gc(app.aaps.core.ui.R.color.widget_low) + lastBgData.isVeryHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_low) lastBgData.isHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_high) else -> rh.gc(app.aaps.core.ui.R.color.widget_inrange) } From 9ef344f41c65c9da2a62e07700e50a249ea2bf94 Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Tue, 31 Dec 2024 15:03:53 +0100 Subject: [PATCH 2/8] veryHighColor --- .../app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt | 2 ++ core/ui/src/main/res/values/attrs.xml | 1 + core/ui/src/main/res/values/colors.xml | 1 + ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt | 3 ++- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt index a7780fa5919..5b0641659dd 100644 --- a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt +++ b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt @@ -36,8 +36,10 @@ class InMemoryGlucoseValueDataPoint( val units = profileFunction.getUnits() val lowLine = preferences.get(UnitDoubleKey.OverviewLowMark) val highLine = preferences.get(UnitDoubleKey.OverviewHighMark) + val veryHighLine = preferences.get(UnitDoubleKey.OverviewVeryHighMark) val color = when { valueToUnits(units) < lowLine -> rh.gac(context, app.aaps.core.ui.R.attr.bgLow) + valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) valueToUnits(units) > highLine -> rh.gac(context, app.aaps.core.ui.R.attr.highColor) else -> rh.gac(context, app.aaps.core.ui.R.attr.bgInRange) } diff --git a/core/ui/src/main/res/values/attrs.xml b/core/ui/src/main/res/values/attrs.xml index b46603151d9..ecc009e4401 100644 --- a/core/ui/src/main/res/values/attrs.xml +++ b/core/ui/src/main/res/values/attrs.xml @@ -89,6 +89,7 @@ + diff --git a/core/ui/src/main/res/values/colors.xml b/core/ui/src/main/res/values/colors.xml index df4abdd40bf..45d700e310d 100644 --- a/core/ui/src/main/res/values/colors.xml +++ b/core/ui/src/main/res/values/colors.xml @@ -360,6 +360,7 @@ #00FF00 #FF0000 #FFFF00 + #FF0000 #f4d700 #FFFFFF #ff0400 diff --git a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt index 624ed4598f3..b06318fd10e 100644 --- a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt +++ b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt @@ -144,7 +144,7 @@ class Widget : AppWidgetProvider() { views.setTextColor( R.id.bg, when { lastBgData.isLow() -> rh.gc(app.aaps.core.ui.R.color.widget_low) - lastBgData.isVeryHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_low) + lastBgData.isVeryHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_very_high) lastBgData.isHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_high) else -> rh.gc(app.aaps.core.ui.R.color.widget_inrange) } @@ -156,6 +156,7 @@ class Widget : AppWidgetProvider() { views.setInt( R.id.arrow, "setColorFilter", when { lastBgData.isLow() -> rh.gc(app.aaps.core.ui.R.color.widget_low) + lastBgData.isVeryHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_very_high) lastBgData.isHigh() -> rh.gc(app.aaps.core.ui.R.color.widget_high) else -> rh.gc(app.aaps.core.ui.R.color.widget_inrange) } From 7908f98be02dd452ad74c91d2273ffe633c561eb Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Tue, 31 Dec 2024 15:46:30 +0100 Subject: [PATCH 3/8] very --- core/ui/src/main/res/values-night/styles.xml | 1 + core/ui/src/main/res/values/styles.xml | 1 + .../kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt | 1 + .../src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt | 1 + 4 files changed, 4 insertions(+) diff --git a/core/ui/src/main/res/values-night/styles.xml b/core/ui/src/main/res/values-night/styles.xml index 5d80a20fcd4..1437aa9990f 100644 --- a/core/ui/src/main/res/values-night/styles.xml +++ b/core/ui/src/main/res/values-night/styles.xml @@ -113,6 +113,7 @@ @color/low @color/high + @color/low @color/inRange @color/helperProfile diff --git a/core/ui/src/main/res/values/styles.xml b/core/ui/src/main/res/values/styles.xml index dd8e587a8d8..4a0be309ec7 100644 --- a/core/ui/src/main/res/values/styles.xml +++ b/core/ui/src/main/res/values/styles.xml @@ -116,6 +116,7 @@ @color/low @color/high + @color/low @color/tempTargetConfirmation @color/helperProfile diff --git a/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt index c1b6a169c91..5ca8202cb48 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/overview/LastBgDataImpl.kt @@ -50,6 +50,7 @@ class LastBgDataImpl @Inject constructor( override fun lastBgColor(context: Context?): Int = when { isLow() -> rh.gac(context, app.aaps.core.ui.R.attr.bgLow) + isVeryHigh() -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) isHigh() -> rh.gac(context, app.aaps.core.ui.R.attr.highColor) else -> rh.gac(context, app.aaps.core.ui.R.attr.bgInRange) } diff --git a/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt b/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt index a2475be56d2..2e18a2439dc 100644 --- a/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt +++ b/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt @@ -4,6 +4,7 @@ enum class JsonKeys(val key: String) { METADATA("metadata"), ENABLESECOND("enableSecond"), HIGHCOLOR("highColor"), + VERYHIGHCOLOR("veryHighColor"), MIDCOLOR("midColor"), LOWCOLOR("lowColor"), LOWBATCOLOR("lowBatColor"), From 5c4b0eaac9ff5bdb9b48d581c3d41d4ad525e6eb Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Tue, 31 Dec 2024 15:54:51 +0100 Subject: [PATCH 4/8] m --- .../app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt | 2 +- plugins/configuration/src/main/res/values/strings.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt index 5b0641659dd..e1fc088c607 100644 --- a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt +++ b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt @@ -39,7 +39,7 @@ class InMemoryGlucoseValueDataPoint( val veryHighLine = preferences.get(UnitDoubleKey.OverviewVeryHighMark) val color = when { valueToUnits(units) < lowLine -> rh.gac(context, app.aaps.core.ui.R.attr.bgLow) - valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) + veryHighLine > 0 && valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) valueToUnits(units) > highLine -> rh.gac(context, app.aaps.core.ui.R.attr.highColor) else -> rh.gac(context, app.aaps.core.ui.R.attr.bgInRange) } diff --git a/plugins/configuration/src/main/res/values/strings.xml b/plugins/configuration/src/main/res/values/strings.xml index 4f74b4085b3..4d591722063 100644 --- a/plugins/configuration/src/main/res/values/strings.xml +++ b/plugins/configuration/src/main/res/values/strings.xml @@ -16,8 +16,10 @@ Display Settings LOW mark HIGH mark + VERY HIGH mark Lower value of in range area (display only) Higher value of in range area (display only) + Even Higher value of in range area (display only) Permission Application needs system window permission for notifications Application needs location permission for BT scan and WiFi identification From c803d1c792a6d9f01ec0eb20ba5e2334c0b9bddf Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Tue, 31 Dec 2024 16:02:16 +0100 Subject: [PATCH 5/8] nd --- app/src/main/kotlin/app/aaps/MainApp.kt | 1 + .../app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index 6c993b95eac..8f1d6d58e35 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -197,6 +197,7 @@ class MainApp : DaggerApplication() { if (preferences.get(IntKey.OverviewEatingSoonDuration) == 0) preferences.remove(IntKey.OverviewEatingSoonDuration) if (preferences.get(UnitDoubleKey.OverviewEatingSoonTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewEatingSoonTarget) if (preferences.get(IntKey.OverviewActivityDuration) == 0) preferences.remove(IntKey.OverviewActivityDuration) + if (preferences.get(UnitDoubleKey.OverviewVeryHighMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewVeryHighMark) if (preferences.get(UnitDoubleKey.OverviewActivityTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewActivityTarget) if (preferences.get(IntKey.OverviewHypoDuration) == 0) preferences.remove(IntKey.OverviewHypoDuration) if (preferences.get(UnitDoubleKey.OverviewHypoTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewHypoTarget) diff --git a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt index e1fc088c607..5b0641659dd 100644 --- a/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt +++ b/core/graph/src/main/kotlin/app/aaps/core/graph/data/InMemoryGlucoseValueDataPoint.kt @@ -39,7 +39,7 @@ class InMemoryGlucoseValueDataPoint( val veryHighLine = preferences.get(UnitDoubleKey.OverviewVeryHighMark) val color = when { valueToUnits(units) < lowLine -> rh.gac(context, app.aaps.core.ui.R.attr.bgLow) - veryHighLine > 0 && valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) + valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor) valueToUnits(units) > highLine -> rh.gac(context, app.aaps.core.ui.R.attr.highColor) else -> rh.gac(context, app.aaps.core.ui.R.attr.bgInRange) } From 6ba5479d83eec5ff9438519cae9cb3b543875626 Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Wed, 1 Jan 2025 14:30:12 +0100 Subject: [PATCH 6/8] add gui --- app/src/main/kotlin/app/aaps/MainApp.kt | 2 +- .../src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt | 2 +- .../plugins/configuration/setupwizard/SWDefinition.kt | 8 ++++++++ .../aaps/plugins/main/general/overview/OverviewPlugin.kt | 2 ++ .../kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt | 1 + 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/app/aaps/MainApp.kt b/app/src/main/kotlin/app/aaps/MainApp.kt index 8f1d6d58e35..ce2321029fd 100644 --- a/app/src/main/kotlin/app/aaps/MainApp.kt +++ b/app/src/main/kotlin/app/aaps/MainApp.kt @@ -197,12 +197,12 @@ class MainApp : DaggerApplication() { if (preferences.get(IntKey.OverviewEatingSoonDuration) == 0) preferences.remove(IntKey.OverviewEatingSoonDuration) if (preferences.get(UnitDoubleKey.OverviewEatingSoonTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewEatingSoonTarget) if (preferences.get(IntKey.OverviewActivityDuration) == 0) preferences.remove(IntKey.OverviewActivityDuration) - if (preferences.get(UnitDoubleKey.OverviewVeryHighMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewVeryHighMark) if (preferences.get(UnitDoubleKey.OverviewActivityTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewActivityTarget) if (preferences.get(IntKey.OverviewHypoDuration) == 0) preferences.remove(IntKey.OverviewHypoDuration) if (preferences.get(UnitDoubleKey.OverviewHypoTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewHypoTarget) if (preferences.get(UnitDoubleKey.OverviewLowMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewLowMark) if (preferences.get(UnitDoubleKey.OverviewHighMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewHighMark) + if (preferences.get(UnitDoubleKey.OverviewVeryHighMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewVeryHighMark) if (preferences.getIfExists(BooleanKey.GeneralSimpleMode) == null) preferences.put(BooleanKey.GeneralSimpleMode, !preferences.get(BooleanKey.GeneralSetupWizardProcessed)) // Migrate from OpenAPSSMBDynamicISFPlugin diff --git a/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt b/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt index 1a44b936e4f..b0a87a749c8 100644 --- a/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt +++ b/core/keys/src/main/kotlin/app/aaps/core/keys/UnitDoubleKey.kt @@ -19,7 +19,7 @@ enum class UnitDoubleKey( OverviewHypoTarget("hypo_target", 160.0, 108, 180, defaultedBySM = true), OverviewLowMark("low_mark", 72.0, 25, 160, showInNsClientMode = false, hideParentScreenIfHidden = true), OverviewHighMark("high_mark", 180.0, 90, 250, showInNsClientMode = false), - OverviewVeryHighMark("very_high_mark", 240.0, 200, 300, showInNsClientMode = false), + OverviewVeryHighMark("very_high_mark", 400.0, 200, 400, showInNsClientMode = false), ApsLgsThreshold("lgsThreshold", 65.0, 65, 120, defaultedBySM = true, dependency = BooleanKey.ApsUseDynamicSensitivity), ApsAutoIsfSmbDeliveryRatioBgRange("openapsama_smb_delivery_ratio_bg_range", 0.0, 0, 100, defaultedBySM = true) } \ No newline at end of file diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt index 9d78daa7e8e..87ea681ad5e 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/SWDefinition.kt @@ -146,6 +146,14 @@ class SWDefinition @Inject constructor( .label(R.string.high_mark) .comment(R.string.high_mark_comment) ) + .add(SWBreak(injector)) + .add( + SWEditNumberWithUnits(injector, UnitDoubleKey.OverviewVeryHighMark.defaultValue * Constants.MGDL_TO_MMOLL, 5.0, 23.0) + .preference(UnitDoubleKey.OverviewVeryHighMark) + .updateDelay(5) + .label(R.string.very_high_mark) + .comment(R.string.very_high_mark_comment) + ) private val screenPermissionWindow get() = SWScreen(injector, R.string.permission) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt index c92e4bf97f8..0a7fac2e968 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt @@ -150,6 +150,7 @@ class OverviewPlugin @Inject constructor( .put(UnitDoubleKey.OverviewHypoTarget, preferences) .put(UnitDoubleKey.OverviewLowMark, preferences) .put(UnitDoubleKey.OverviewHighMark, preferences) + .put(UnitDoubleKey.OverviewVeryHighMark, preferences) .put(IntKey.OverviewCageWarning, preferences) .put(IntKey.OverviewCageCritical, preferences) .put(IntKey.OverviewIageWarning, preferences) @@ -180,6 +181,7 @@ class OverviewPlugin @Inject constructor( .store(UnitDoubleKey.OverviewHypoTarget, preferences) .store(UnitDoubleKey.OverviewLowMark, preferences) .store(UnitDoubleKey.OverviewHighMark, preferences) + .store(UnitDoubleKey.OverviewVeryHighMark, preferences) .store(IntKey.OverviewCageWarning, preferences) .store(IntKey.OverviewCageCritical, preferences) .store(IntKey.OverviewIageWarning, preferences) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt index e261cceb120..b0a6156065c 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt @@ -126,6 +126,7 @@ class TizenPlugin @Inject constructor( bundle.putDouble("deltaMgdl", glucoseStatus.delta) // bg delta in mgdl bundle.putDouble("avgDeltaMgdl", glucoseStatus.shortAvgDelta) // average bg delta bundle.putDouble("high", preferences.get(UnitDoubleKey.OverviewHighMark)) // predefined top value of in range (green area) + bundle.putDouble("veryHigh", preferences.get(UnitDoubleKey.OverviewVeryHighMark)) // predefined very top value of in range (above yellow area) bundle.putDouble("low", preferences.get(UnitDoubleKey.OverviewLowMark)) // predefined bottom value of in range } From b145a33507e18ad7b401ed957b99fc1dfc829fac Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Wed, 1 Jan 2025 14:39:16 +0100 Subject: [PATCH 7/8] very high mark --- .../app/aaps/plugins/main/general/overview/OverviewPlugin.kt | 1 + plugins/main/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt index 0a7fac2e968..a191994baca 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewPlugin.kt @@ -262,6 +262,7 @@ class OverviewPlugin @Inject constructor( title = rh.gs(R.string.prefs_range_title) addPreference(AdaptiveUnitPreference(ctx = context, unitKey = UnitDoubleKey.OverviewLowMark, title = R.string.low_mark)) addPreference(AdaptiveUnitPreference(ctx = context, unitKey = UnitDoubleKey.OverviewHighMark, title = R.string.high_mark)) + addPreference(AdaptiveUnitPreference(ctx = context, unitKey = UnitDoubleKey.OverviewVeryHighMark, title = R.string.very_high_mark)) }) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.OverviewShortTabTitles, title = R.string.short_tabtitles)) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.OverviewShowNotesInDialogs, title = R.string.overview_show_notes_field_in_dialogs_title)) diff --git a/plugins/main/src/main/res/values/strings.xml b/plugins/main/src/main/res/values/strings.xml index d1d78301e54..c1ca3bce097 100644 --- a/plugins/main/src/main/res/values/strings.xml +++ b/plugins/main/src/main/res/values/strings.xml @@ -265,6 +265,7 @@ High and low mark for the charts in Overview and Smartwatch LOW mark HIGH mark + VERY HIGH mark Shorten tab titles Show notes field in treatment dialogs Bolus wizard performs calculation but only this part of calculated insulin is delivered. Useful with SMB algorithm. From 6a44a3cbdaf03f8afc4ebdf05d6f19fe5fe42802 Mon Sep 17 00:00:00 2001 From: Friedel van Megen Date: Thu, 2 Jan 2025 12:57:21 +0100 Subject: [PATCH 8/8] remove wear related data --- .../src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt | 1 - .../src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt | 1 - 2 files changed, 2 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt index b0a6156065c..e261cceb120 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/tizen/TizenPlugin.kt @@ -126,7 +126,6 @@ class TizenPlugin @Inject constructor( bundle.putDouble("deltaMgdl", glucoseStatus.delta) // bg delta in mgdl bundle.putDouble("avgDeltaMgdl", glucoseStatus.shortAvgDelta) // average bg delta bundle.putDouble("high", preferences.get(UnitDoubleKey.OverviewHighMark)) // predefined top value of in range (green area) - bundle.putDouble("veryHigh", preferences.get(UnitDoubleKey.OverviewVeryHighMark)) // predefined very top value of in range (above yellow area) bundle.putDouble("low", preferences.get(UnitDoubleKey.OverviewLowMark)) // predefined bottom value of in range } diff --git a/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt b/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt index 2e18a2439dc..a2475be56d2 100644 --- a/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt +++ b/shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt @@ -4,7 +4,6 @@ enum class JsonKeys(val key: String) { METADATA("metadata"), ENABLESECOND("enableSecond"), HIGHCOLOR("highColor"), - VERYHIGHCOLOR("veryHighColor"), MIDCOLOR("midColor"), LOWCOLOR("lowColor"), LOWBATCOLOR("lowBatColor"),