From 382691317d3f869a998f9f546e60826e40a1449c Mon Sep 17 00:00:00 2001 From: alex-poor Date: Fri, 20 Nov 2026 22:05:40 +1300 Subject: [PATCH] fix(autoisf): show lgsThreshold row in the AutoISF settings screen The AdaptiveUnitPreference for ApsLgsThreshold was commented out of OpenAPSAutoISFPlugin's preference screen (it is active in OpenAPSSMBPlugin). So even after honouring the pref in the algorithm and removing its DynISF visibility dependency, the row never appeared under the active AutoISF plugin's settings. Uncomment it (with the needed import), matching the SMB plugin, so the Low Glucose Suspend threshold is actually settable on autoISF. Co-Authored-By: Claude Opus 4.8 --- .../aaps/plugins/aps/openAPSAutoISF/OpenAPSAutoISFPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 101907c904f7..b5f4a846201f 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 @@ -67,6 +67,7 @@ import app.aaps.core.validators.preferences.AdaptiveDoublePreference import app.aaps.core.validators.preferences.AdaptiveIntPreference import app.aaps.core.validators.preferences.AdaptiveIntentPreference import app.aaps.core.validators.preferences.AdaptiveSwitchPreference +import app.aaps.core.validators.preferences.AdaptiveUnitPreference import app.aaps.plugins.aps.OpenAPSFragment import app.aaps.plugins.aps.R import app.aaps.plugins.aps.events.EventOpenAPSUpdateGui @@ -951,7 +952,7 @@ open class OpenAPSAutoISFPlugin @Inject constructor( addPreference(AdaptiveDoublePreference(ctx = context, doubleKey = DoubleKey.ApsMaxBasal, dialogMessage = R.string.openapsma_max_basal_summary, title = R.string.openapsma_max_basal_title)) addPreference(AdaptiveDoublePreference(ctx = context, doubleKey = DoubleKey.ApsSmbMaxIob, dialogMessage = R.string.openapssmb_max_iob_summary, title = R.string.openapssmb_max_iob_title)) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.ApsUseAutosens, title = R.string.openapsama_use_autosens)) - //addPreference(AdaptiveUnitPreference(ctx = context, unitKey = UnitDoubleKey.ApsLgsThreshold, dialogMessage = R.string.lgs_threshold_summary, title = R.string.lgs_threshold_title)) + addPreference(AdaptiveUnitPreference(ctx = context, unitKey = UnitDoubleKey.ApsLgsThreshold, dialogMessage = R.string.lgs_threshold_summary, title = R.string.lgs_threshold_title)) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.ApsSensitivityRaisesTarget, summary = R.string.sensitivity_raises_target_summary, title = R.string.sensitivity_raises_target_title)) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.ApsResistanceLowersTarget, summary = R.string.resistance_lowers_target_summary, title = R.string.resistance_lowers_target_title)) addPreference(AdaptiveSwitchPreference(ctx = context, booleanKey = BooleanKey.ApsAutoIsfHighTtRaisesSens, summary = R.string.high_temptarget_raises_sensitivity_summary, title = R.string.high_temptarget_raises_sensitivity_title))