From dc4cc6c837afb3627844e31ef01d6d6b05ee486f Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 25 Sep 2023 21:33:50 +0200 Subject: [PATCH] fix DynISF activation --- .../nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt | 4 ++-- .../plugins/constraints/objectives/objectives/Objective5.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index 113bd10f5b..e7cec2e4e2 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -218,11 +218,11 @@ open class OpenAPSSMBPlugin @Inject constructor( constraintChecker.isAdvancedFilteringEnabled(it) inputConstraints.copyReasons(it) } - val uam = ConstraintObject(false, aapsLogger).also { + val uam = ConstraintObject(true, aapsLogger).also { constraintChecker.isUAMEnabled(it) inputConstraints.copyReasons(it) } - dynIsfEnabled = ConstraintObject(false, aapsLogger).also { + dynIsfEnabled = ConstraintObject(true, aapsLogger).also { constraintChecker.isDynIsfModeEnabled(it) inputConstraints.copyReasons(it) } diff --git a/plugins/constraints/src/main/java/info/nightscout/plugins/constraints/objectives/objectives/Objective5.kt b/plugins/constraints/src/main/java/info/nightscout/plugins/constraints/objectives/objectives/Objective5.kt index bed7e387a4..8e66cf7d04 100644 --- a/plugins/constraints/src/main/java/info/nightscout/plugins/constraints/objectives/objectives/Objective5.kt +++ b/plugins/constraints/src/main/java/info/nightscout/plugins/constraints/objectives/objectives/Objective5.kt @@ -19,7 +19,7 @@ class Objective5(injector: HasAndroidInjector) : Objective(injector, "maxiobzero tasks.add( object : Task(this, R.string.closedmodeenabled) { override fun isCompleted(): Boolean { - val closedLoopEnabled = ConstraintObject(false, aapsLogger) + val closedLoopEnabled = ConstraintObject(true, aapsLogger) safetyPlugin.isClosedLoopAllowed(closedLoopEnabled) return closedLoopEnabled.value() }