From 9cd2e491c912a047e01b65fd21f0acea92af5b00 Mon Sep 17 00:00:00 2001 From: Philoul Date: Mon, 2 Dec 2024 23:20:24 +0100 Subject: [PATCH 1/6] Overview add Sensitivity OKDialog --- .../kotlin/app/aaps/core/interfaces/aps/APS.kt | 6 ++++++ core/ui/src/main/res/values/strings.xml | 2 ++ .../aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt | 2 ++ .../main/general/overview/OverviewFragment.kt | 16 +++++++++++++--- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/aps/APS.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/aps/APS.kt index 188d0ae0ec5..219e38eb396 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/aps/APS.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/aps/APS.kt @@ -31,6 +31,12 @@ interface APS : ConfigExportImport { */ fun supportsDynamicIc(): Boolean = false + /** + * Dedicated string for Sensitivity OKDialog in overview on ISF calculation ? + * @return string or null if nothing to show + */ + fun getSensitivityOverviewString(): String? = null + /** * Calculate current ISF * @param multiplier Multiplier from profile switch. Algorithm can take it into a count or ignore diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xml index 6f5ed8199ad..123278c2466 100644 --- a/core/ui/src/main/res/values/strings.xml +++ b/core/ui/src/main/res/values/strings.xml @@ -430,6 +430,8 @@ %1$.0f%% Basal Basal % + Sensitivity + ISF for carbs absorption: %1$.1f file user diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt index b93f6453294..df5c71468ef 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt @@ -191,6 +191,8 @@ open class OpenAPSAutoISFPlugin @Inject constructor( return sensitivity } + override fun getSensitivityOverviewString(): String? = null // placeholder for Auto ISF Detailed information for overview + override fun specialEnableCondition(): Boolean { return config.isEngineeringMode() && config.isDev() && try { diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 3acc6285e69..f89248f8c62 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -1146,13 +1146,23 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList if (variableSens != isfMgdl && variableSens != 0.0 && isfMgdl != null) { var text = if (ratioUsed != 1.0 && ratioUsed != lastAutosensData?.autosensResult?.ratio) String.format(Locale.getDefault(), "%.0f%%\n", ratioUsed * 100) else "" text += String.format( - Locale.getDefault(), "%1$.1f→%2$.1f (%3$.1f)", + Locale.getDefault(), "%1$.1f→%2$.1f", profileUtil.fromMgdlToUnits(isfMgdl, profileFunction.getUnits()), - profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()), - profileUtil.fromMgdlToUnits(isfForCarbs ?: 0.0, profileFunction.getUnits()) + profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()) ) binding.infoLayout.variableSensitivity.text = text binding.infoLayout.variableSensitivity.visibility = View.VISIBLE + var sensitivityText = rh.gs(app.aaps.core.ui.R.string.isf_for_carbs, profileUtil.fromMgdlToUnits(isfForCarbs ?: 0.0, profileFunction.getUnits())) + if (config.APS) { + val aps = activePlugin.activeAPS + aps.getSensitivityOverviewString()?.let { + sensitivityText += "\n$it" + } + } + runOnUiThread { + _binding ?: return@runOnUiThread + binding.infoLayout.asLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(app.aaps.core.ui.R.string.sensitivity), sensitivityText) } } + } } else binding.infoLayout.variableSensitivity.visibility = View.GONE } From 7623f9dabaf7984bccbf58689af76c1d5e533fb0 Mon Sep 17 00:00:00 2001 From: Philoul Date: Sun, 8 Dec 2024 18:30:11 +0100 Subject: [PATCH 2/6] Overview remove additional runOnUiThread --- .../aaps/plugins/main/general/overview/OverviewFragment.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index f89248f8c62..d490744fe41 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -1159,10 +1159,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList sensitivityText += "\n$it" } } - runOnUiThread { - _binding ?: return@runOnUiThread - binding.infoLayout.asLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(app.aaps.core.ui.R.string.sensitivity), sensitivityText) } } - } + binding.infoLayout.asLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(app.aaps.core.ui.R.string.sensitivity), sensitivityText) } } } else binding.infoLayout.variableSensitivity.visibility = View.GONE } From ad2115696c07e63a554e50f145b843c001104ca2 Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 17 Dec 2024 23:10:54 +0100 Subject: [PATCH 3/6] Update OverView Autosens and OkDialog --- core/ui/src/main/res/values/strings.xml | 3 + .../main/general/overview/OverviewFragment.kt | 73 ++++++++++++++----- 2 files changed, 59 insertions(+), 17 deletions(-) diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xml index 123278c2466..fef7f72e6a2 100644 --- a/core/ui/src/main/res/values/strings.xml +++ b/core/ui/src/main/res/values/strings.xml @@ -432,6 +432,9 @@ Basal % Sensitivity ISF for carbs absorption: %1$.1f + Autosens Value: %.0f%% + AS: %.0f%% + Autosens in Loop: %.0f%% file user diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index d490744fe41..4d7d54851b0 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -81,6 +81,7 @@ import app.aaps.core.interfaces.utils.DecimalFormatter import app.aaps.core.interfaces.utils.TrendCalculator import app.aaps.core.interfaces.utils.fabric.FabricPrivacy import app.aaps.core.keys.BooleanKey +import app.aaps.core.keys.DoubleKey import app.aaps.core.keys.Preferences import app.aaps.core.keys.UnitDoubleKey import app.aaps.core.objects.constraints.ConstraintObject @@ -1120,18 +1121,34 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList private fun updateSensitivity() { _binding ?: return val lastAutosensData = iobCobCalculator.ads.getLastAutosensData("Overview", aapsLogger, dateUtil) + val lastAutosensRatio = lastAutosensData?.let { it.autosensResult.ratio * 100 } if (config.NSCLIENT && sp.getBoolean(app.aaps.core.utils.R.string.key_used_autosens_on_main_phone, false) || !config.NSCLIENT && constraintChecker.isAutosensModeEnabled().value() ) { - binding.infoLayout.sensitivityIcon.setImageResource(app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green) + binding.infoLayout.sensitivityIcon.setImageResource( + lastAutosensRatio?.let { + when { + it > 100.0 -> app.aaps.core.objects.R.drawable.ic_as_above + it < 100.0 -> app.aaps.core.objects.R.drawable.ic_as_below + else -> app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green + } + } + ?: app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green + ) } else { - binding.infoLayout.sensitivityIcon.setImageResource(app.aaps.core.objects.R.drawable.ic_x_swap_vert) + binding.infoLayout.sensitivityIcon.setImageResource( + lastAutosensRatio?.let { + when { + it > 100.0 -> app.aaps.core.objects.R.drawable.ic_x_as_above + it < 100.0 -> app.aaps.core.objects.R.drawable.ic_x_as_below + else -> app.aaps.core.objects.R.drawable.ic_x_swap_vert + } + } + ?: app.aaps.core.objects.R.drawable.ic_x_swap_vert + ) } - binding.infoLayout.sensitivity.text = - lastAutosensData?.let { - String.format(Locale.ENGLISH, "AS: %.0f%%", it.autosensResult.ratio * 100) - } ?: "" + // Show variable sensitivity val profile = profileFunction.getProfile() val request = loop.lastRun?.request @@ -1144,23 +1161,45 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val ratioUsed = request?.autosensResult?.ratio ?: 1.0 if (variableSens != isfMgdl && variableSens != 0.0 && isfMgdl != null) { - var text = if (ratioUsed != 1.0 && ratioUsed != lastAutosensData?.autosensResult?.ratio) String.format(Locale.getDefault(), "%.0f%%\n", ratioUsed * 100) else "" - text += String.format( - Locale.getDefault(), "%1$.1f→%2$.1f", - profileUtil.fromMgdlToUnits(isfMgdl, profileFunction.getUnits()), - profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()) + val okDialogText: ArrayList = ArrayList() + val overViewText: ArrayList = ArrayList() + val autoSensHiddenRange = 0.2 //Hide Autosens value if below 20% of Autosens Range + val autoSensMax = 100.0 + (preferences.get(DoubleKey.AutosensMax) - 1.0) * autoSensHiddenRange * 100.0 + val autoSensMin = 100.0 + (preferences.get(DoubleKey.AutosensMin) - 1.0) * autoSensHiddenRange * 100.0 + lastAutosensRatio?.let { + if(it < autoSensMin || it > autoSensMax) + overViewText.add(rh.gs(app.aaps.core.ui.R.string.autosens_short, it)) + okDialogText.add(rh.gs(app.aaps.core.ui.R.string.autosens_long, it)) + } + overViewText.add( + String.format( + Locale.getDefault(), "%1$.1f→%2$.1f", + profileUtil.fromMgdlToUnits(isfMgdl, profileFunction.getUnits()), + profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()) + ) ) - binding.infoLayout.variableSensitivity.text = text - binding.infoLayout.variableSensitivity.visibility = View.VISIBLE - var sensitivityText = rh.gs(app.aaps.core.ui.R.string.isf_for_carbs, profileUtil.fromMgdlToUnits(isfForCarbs ?: 0.0, profileFunction.getUnits())) + binding.infoLayout.sensitivity.text = overViewText.joinToString("\n") + binding.infoLayout.sensitivity.visibility = View.VISIBLE + binding.infoLayout.variableSensitivity.visibility = View.GONE + if (ratioUsed != 1.0 && ratioUsed != lastAutosensData?.autosensResult?.ratio) + okDialogText.add(rh.gs(app.aaps.core.ui.R.string.algorithm_long, ratioUsed * 100)) + okDialogText.add(rh.gs(app.aaps.core.ui.R.string.isf_for_carbs, profileUtil.fromMgdlToUnits(isfForCarbs ?: 0.0, profileFunction.getUnits()))) if (config.APS) { val aps = activePlugin.activeAPS aps.getSensitivityOverviewString()?.let { - sensitivityText += "\n$it" + okDialogText.add("$it") } } - binding.infoLayout.asLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(app.aaps.core.ui.R.string.sensitivity), sensitivityText) } } - } else binding.infoLayout.variableSensitivity.visibility = View.GONE + binding.infoLayout.asLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(app.aaps.core.ui.R.string.sensitivity), okDialogText.joinToString("\n")) } } + + } else { + binding.infoLayout.sensitivity.text = + lastAutosensData?.let { + rh.gs(app.aaps.core.ui.R.string.autosens_short,it.autosensResult.ratio * 100) + } ?: "" + binding.infoLayout.variableSensitivity.visibility = View.GONE + binding.infoLayout.sensitivity.visibility = View.VISIBLE + } } private fun updatePumpStatus() { From 8e614c1e17a18649b5ec795bac301cff863bf261 Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 17 Dec 2024 00:12:24 +0100 Subject: [PATCH 4/6] Add Autosens icons --- _docs/icons/as_above.svg | 9 +++++++++ _docs/icons/as_below.svg | 9 +++++++++ _docs/icons/x_as_above.svg | 15 +++++++++++++++ _docs/icons/x_as_below.svg | 15 +++++++++++++++ .../objects/src/main/res/drawable/ic_as_above.xml | 9 +++++++++ .../objects/src/main/res/drawable/ic_as_below.xml | 9 +++++++++ .../src/main/res/drawable/ic_x_as_above.xml | 13 +++++++++++++ .../src/main/res/drawable/ic_x_as_below.xml | 13 +++++++++++++ 8 files changed, 92 insertions(+) create mode 100644 _docs/icons/as_above.svg create mode 100644 _docs/icons/as_below.svg create mode 100644 _docs/icons/x_as_above.svg create mode 100644 _docs/icons/x_as_below.svg create mode 100644 core/objects/src/main/res/drawable/ic_as_above.xml create mode 100644 core/objects/src/main/res/drawable/ic_as_below.xml create mode 100644 core/objects/src/main/res/drawable/ic_x_as_above.xml create mode 100644 core/objects/src/main/res/drawable/ic_x_as_below.xml diff --git a/_docs/icons/as_above.svg b/_docs/icons/as_above.svg new file mode 100644 index 00000000000..c91dd26b169 --- /dev/null +++ b/_docs/icons/as_above.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/_docs/icons/as_below.svg b/_docs/icons/as_below.svg new file mode 100644 index 00000000000..2d48a14f638 --- /dev/null +++ b/_docs/icons/as_below.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/_docs/icons/x_as_above.svg b/_docs/icons/x_as_above.svg new file mode 100644 index 00000000000..5927ff86a28 --- /dev/null +++ b/_docs/icons/x_as_above.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/_docs/icons/x_as_below.svg b/_docs/icons/x_as_below.svg new file mode 100644 index 00000000000..ae867866a67 --- /dev/null +++ b/_docs/icons/x_as_below.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/core/objects/src/main/res/drawable/ic_as_above.xml b/core/objects/src/main/res/drawable/ic_as_above.xml new file mode 100644 index 00000000000..0dd8653eda0 --- /dev/null +++ b/core/objects/src/main/res/drawable/ic_as_above.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/core/objects/src/main/res/drawable/ic_as_below.xml b/core/objects/src/main/res/drawable/ic_as_below.xml new file mode 100644 index 00000000000..e1f2a846ff6 --- /dev/null +++ b/core/objects/src/main/res/drawable/ic_as_below.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/core/objects/src/main/res/drawable/ic_x_as_above.xml b/core/objects/src/main/res/drawable/ic_x_as_above.xml new file mode 100644 index 00000000000..71fc9a46992 --- /dev/null +++ b/core/objects/src/main/res/drawable/ic_x_as_above.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/core/objects/src/main/res/drawable/ic_x_as_below.xml b/core/objects/src/main/res/drawable/ic_x_as_below.xml new file mode 100644 index 00000000000..866e0d61edd --- /dev/null +++ b/core/objects/src/main/res/drawable/ic_x_as_below.xml @@ -0,0 +1,13 @@ + + + + + + + + + From 0b10f1a251f8df1c748f951104c64475d67fde52 Mon Sep 17 00:00:00 2001 From: Philoul Date: Wed, 18 Dec 2024 18:23:18 +0100 Subject: [PATCH 5/6] Update Widget with Sensitivity Arrow and short strings --- core/ui/src/main/res/values/strings.xml | 1 + .../main/kotlin/app/aaps/ui/widget/Widget.kt | 44 +++++++++++++++---- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xml index fef7f72e6a2..e908bc21e81 100644 --- a/core/ui/src/main/res/values/strings.xml +++ b/core/ui/src/main/res/values/strings.xml @@ -435,6 +435,7 @@ Autosens Value: %.0f%% AS: %.0f%% Autosens in Loop: %.0f%% + Alg: %.0f%% file user 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..09863181f10 100644 --- a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt +++ b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt @@ -35,10 +35,12 @@ import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.DecimalFormatter import app.aaps.core.interfaces.utils.TrendCalculator +import app.aaps.core.keys.DoubleKey import app.aaps.core.objects.extensions.directionToIcon import app.aaps.core.objects.extensions.displayText import app.aaps.core.objects.extensions.round import app.aaps.core.objects.profile.ProfileSealed +import app.aaps.core.ui.dialogs.OKDialog import app.aaps.core.ui.extensions.toVisibility import app.aaps.core.ui.extensions.toVisibilityKeepSpace import app.aaps.ui.R @@ -274,12 +276,33 @@ class Widget : AppWidgetProvider() { private fun updateSensitivity(views: RemoteViews) { val lastAutosensData = iobCobCalculator.ads.getLastAutosensData("Widget", aapsLogger, dateUtil) + val lastAutosensRatio = lastAutosensData?.let { it.autosensResult.ratio * 100 } if (constraintChecker.isAutosensModeEnabled().value()) - views.setImageViewResource(R.id.sensitivity_icon, app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green) + views.setImageViewResource( + R.id.sensitivity_icon, + lastAutosensRatio?.let { + when { + it > 100.0 -> app.aaps.core.objects.R.drawable.ic_as_above + it < 100.0 -> app.aaps.core.objects.R.drawable.ic_as_below + else -> app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green + } + } + ?: app.aaps.core.objects.R.drawable.ic_swap_vert_black_48dp_green + ) else - views.setImageViewResource(R.id.sensitivity_icon, app.aaps.core.objects.R.drawable.ic_x_swap_vert) + views.setImageViewResource( + R.id.sensitivity_icon, + lastAutosensRatio?.let { + when { + it > 100.0 -> app.aaps.core.objects.R.drawable.ic_x_as_above + it < 100.0 -> app.aaps.core.objects.R.drawable.ic_x_as_below + else -> app.aaps.core.objects.R.drawable.ic_x_swap_vert + } + } + ?: app.aaps.core.objects.R.drawable.ic_x_swap_vert + ) views.setTextViewText(R.id.sensitivity, lastAutosensData?.let { - String.format(Locale.ENGLISH, "%.0f%%", it.autosensResult.ratio * 100) + rh.gs(app.aaps.core.ui.R.string.autosens_short, it.autosensResult.ratio * 100) } ?: "") // Show variable sensitivity @@ -291,13 +314,16 @@ class Widget : AppWidgetProvider() { else 0.0 val ratioUsed = request?.autosensResult?.ratio ?: 1.0 if (variableSens != isfMgdl && variableSens != 0.0 && isfMgdl != null) { - var text = if (ratioUsed != 1.0 && ratioUsed != lastAutosensData?.autosensResult?.ratio) String.format(Locale.getDefault(), "%.0f%%\n", ratioUsed * 100) else "" - text += String.format( - Locale.getDefault(), "%1$.1f→%2$.1f", - profileUtil.fromMgdlToUnits(isfMgdl, profileFunction.getUnits()), - profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()) + val overViewText: ArrayList = ArrayList() + if (ratioUsed != 1.0 && ratioUsed != lastAutosensData?.autosensResult?.ratio) overViewText.add(rh.gs(app.aaps.core.ui.R.string.algorithm_short,ratioUsed * 100)) + overViewText.add( + String.format( + Locale.getDefault(), "%1$.1f→%2$.1f", + profileUtil.fromMgdlToUnits(isfMgdl, profileFunction.getUnits()), + profileUtil.fromMgdlToUnits(variableSens, profileFunction.getUnits()) + ) ) - views.setTextViewText(R.id.variable_sensitivity, text) + views.setTextViewText(R.id.variable_sensitivity, overViewText.joinToString("\n")) views.setViewVisibility(R.id.variable_sensitivity, View.VISIBLE) } else views.setViewVisibility(R.id.variable_sensitivity, View.GONE) } From 6909833338e9976a0631ab70d4d4e84043dc6ef1 Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 7 Jan 2025 00:29:04 +0100 Subject: [PATCH 6/6] Update String and AS visibility --- core/ui/src/main/res/values/strings.xml | 4 ++-- .../aaps/plugins/main/general/overview/OverviewFragment.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xml index e908bc21e81..298dfd4a373 100644 --- a/core/ui/src/main/res/values/strings.xml +++ b/core/ui/src/main/res/values/strings.xml @@ -431,10 +431,10 @@ Basal Basal % Sensitivity - ISF for carbs absorption: %1$.1f + ISF for Calculator and Carbs Absorption: %1$.1f Autosens Value: %.0f%% AS: %.0f%% - Autosens in Loop: %.0f%% + Autosens in algorithm: %.0f%% Alg: %.0f%% file user diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 4d7d54851b0..f041bfd37ed 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -1163,7 +1163,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList if (variableSens != isfMgdl && variableSens != 0.0 && isfMgdl != null) { val okDialogText: ArrayList = ArrayList() val overViewText: ArrayList = ArrayList() - val autoSensHiddenRange = 0.2 //Hide Autosens value if below 20% of Autosens Range + val autoSensHiddenRange = 0.0 //Hide Autosens value if equals 100% val autoSensMax = 100.0 + (preferences.get(DoubleKey.AutosensMax) - 1.0) * autoSensHiddenRange * 100.0 val autoSensMin = 100.0 + (preferences.get(DoubleKey.AutosensMin) - 1.0) * autoSensHiddenRange * 100.0 lastAutosensRatio?.let {