diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java index e5d3b68b0e..76cb43d12a 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java @@ -23,6 +23,7 @@ import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialo import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderFragment; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; +import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesPlugin; import info.nightscout.androidaps.plugins.Loop.LoopPlugin; import info.nightscout.androidaps.plugins.NSClientInternal.NSClientPlugin; import info.nightscout.androidaps.plugins.ProfileLocal.LocalProfileFragment; @@ -126,6 +127,8 @@ public class SWDefinition { ) .add(new SWScreen(R.string.configbuilder_bgsource) .skippable(false) + .add(new SWInfotext() + .label(R.string.setupwizard_bgsource_description)) .add(new SWPlugin() .option(PluginType.BGSOURCE) .label(R.string.configbuilder_bgsource)) @@ -216,6 +219,8 @@ public class SWDefinition { ) .add(new SWScreen(R.string.configbuilder_loop) .skippable(false) + .add(new SWInfotext() + .label(R.string.setupwizard_loop_description)) .add(new SWButton() .text(R.string.enableloop) .action(() -> { @@ -229,6 +234,23 @@ public class SWDefinition { .validator(() -> LoopPlugin.getPlugin().isEnabled(PluginType.LOOP)) .visibility(() -> !LoopPlugin.getPlugin().isEnabled(PluginType.LOOP)) ) + .add(new SWScreen(R.string.objectives) + .skippable(false) + .add(new SWInfotext() + .label(R.string.setupwizard_objectives_description)) + .add(new SWButton() + .text(R.string.objectives_button_start) + .action(() -> { + ObjectivesPlugin.getPlugin().setPluginEnabled(PluginType.CONSTRAINTS, true); + ObjectivesPlugin.getPlugin().setFragmentVisible(PluginType.CONSTRAINTS, true); + ConfigBuilderFragment.processOnEnabledCategoryChanged(ObjectivesPlugin.getPlugin(), PluginType.CONSTRAINTS); + ConfigBuilderPlugin.getPlugin().storeSettings("SetupWizard"); + MainApp.bus().post(new EventConfigBuilderChange()); + MainApp.bus().post(new EventSWUpdate(true)); + })) + .validator(() -> ObjectivesPlugin.getPlugin().isEnabled(PluginType.CONSTRAINTS)) + .visibility(() -> !ObjectivesPlugin.getPlugin().isFragmentVisible()) + ) ; } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f033174b6e..35fff2ce20 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1064,5 +1064,8 @@ Read status Changes must be done in NS Exit setup wizard? + Where should blood glucose(BG) data be comming from ? + Press the button below to enable AndroidAPS to suggest/make basal changes + Press the button below to enable Objectives. Look in the Objectives tab, after you finish this wizard, to make AndroidAPS completely functional.