From 70ed332b7cc8fdc9ec2eb19ba813748b2647f10f Mon Sep 17 00:00:00 2001 From: Philoul Date: Fri, 6 May 2022 12:10:23 +0200 Subject: [PATCH] Remove Engineering constraint in RunAutomation automation --- .../plugins/general/automation/actions/ActionRunAutotune.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt index 1c7c3f7b28..d756ab7423 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt @@ -16,7 +16,6 @@ import info.nightscout.androidaps.plugins.general.automation.elements.LabelWithE import info.nightscout.androidaps.plugins.general.automation.elements.LayoutBuilder import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.JsonHelper -import info.nightscout.androidaps.utils.buildHelper.BuildHelper import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject @@ -29,7 +28,6 @@ class ActionRunAutotune(injector: HasAndroidInjector) : Action(injector) { @Inject lateinit var activePlugin: ActivePlugin @Inject lateinit var sp: SP @Inject lateinit var uel: UserEntryLogger - @Inject lateinit var buildHelper: BuildHelper var defaultValue = 0 private var inputProfileName = InputProfileName(rh, activePlugin, "", true) @@ -40,7 +38,7 @@ class ActionRunAutotune(injector: HasAndroidInjector) : Action(injector) { @DrawableRes override fun icon(): Int = R.drawable.ic_actions_profileswitch override fun doAction(callback: Callback) { - val autoSwitch = sp.getBoolean(R.string.key_autotune_auto, false) && buildHelper.isEngineeringMode() + val autoSwitch = sp.getBoolean(R.string.key_autotune_auto, false) val profileName = if (inputProfileName.value == rh.gs(R.string.active)) "" else inputProfileName.value var message = if (autoSwitch) R.string.autotune_run_with_autoswitch else R.string.autotune_run_without_autoswitch Thread {