Skip to content

Commit b3f47cf

Browse files
Emil Obalskirlubos
authored andcommitted
applications: machine_learning: Rename ml_state to ml_app_mode
ml_mode module is a module responsible for changing the application mode between running the AI model and forwarding data. This change makes its naming meaningful. Jira: NCSDK-12535 Signed-off-by: Emil Obalski <[email protected]>
1 parent 6a4ec41 commit b3f47cf

34 files changed

+211
-203
lines changed

applications/machine_learning/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ The nRF Machine Learning application also uses the following dedicated applicati
540540
The module runs the machine learning model and provides results only if there is an active subsriber.
541541
An application module can inform that it is actively listening for results using :c:struct:`ml_result_signin_event`.
542542

543-
``ml_state``
544-
The module controls switching between running the machine learning model and forwarding the data.
543+
``ml_app_mode``
544+
The module controls Application mode. It switches between running the machine learning model and forwarding the data.
545545
The change is triggered by a long press of the button defined in the module's configuration.
546546

547547
``sensor_sim_ctrl``

applications/machine_learning/configuration/nrf52840dk_nrf52840/click_detector_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const struct {} click_detector_def_include_once;
1818

1919
static const struct click_detector_config click_detector_config[] = {
2020
{
21-
.key_id = CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID,
21+
.key_id = CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID,
2222
.consume_button_event = true,
2323
},
2424
};

applications/machine_learning/configuration/nrf52840dk_nrf52840/prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ CONFIG_ML_APP_SENSOR_SIM_CTRL=y
1919
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON=y
2020
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON_ID=0x0002
2121

22-
CONFIG_ML_APP_ML_STATE=y
23-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
22+
CONFIG_ML_APP_MODE=y
23+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2424

2525
CONFIG_ML_APP_LED_STATE=y
2626
CONFIG_ML_APP_LED_STATE_VALUE_THRESH=900

applications/machine_learning/configuration/nrf52840dk_nrf52840/prj_nus.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ CONFIG_ML_APP_SENSOR_SIM_CTRL=y
2424
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON=y
2525
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON_ID=0x0002
2626

27-
CONFIG_ML_APP_ML_STATE=y
28-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
27+
CONFIG_ML_APP_MODE=y
28+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2929

3030
CONFIG_ML_APP_LED_STATE=y
3131
CONFIG_ML_APP_LED_STATE_VALUE_THRESH=900

applications/machine_learning/configuration/nrf52840dk_nrf52840/prj_release.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ CONFIG_ML_APP_SENSOR_SIM_CTRL=y
1919
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON=y
2020
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON_ID=0x0002
2121

22-
CONFIG_ML_APP_ML_STATE=y
23-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
22+
CONFIG_ML_APP_MODE=y
23+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2424

2525
CONFIG_ML_APP_LED_STATE=y
2626
CONFIG_ML_APP_LED_STATE_VALUE_THRESH=900

applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/click_detector_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const struct {} click_detector_def_include_once;
1818

1919
static const struct click_detector_config click_detector_config[] = {
2020
{
21-
.key_id = CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID,
21+
.key_id = CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID,
2222
.consume_button_event = true,
2323
},
2424
};

applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ CONFIG_ML_APP_SENSOR_SIM_CTRL=y
1919
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON=y
2020
CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON_ID=0x0002
2121

22-
CONFIG_ML_APP_ML_STATE=y
23-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
22+
CONFIG_ML_APP_MODE=y
23+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2424

2525
CONFIG_ML_APP_LED_STATE=y
2626
CONFIG_ML_APP_LED_STATE_VALUE_THRESH=900

applications/machine_learning/configuration/thingy52_nrf52832/click_detector_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const struct {} click_detector_def_include_once;
1818

1919
static const struct click_detector_config click_detector_config[] = {
2020
{
21-
.key_id = CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID,
21+
.key_id = CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID,
2222
.consume_button_event = true,
2323
},
2424
};

applications/machine_learning/configuration/thingy52_nrf52832/prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ CONFIG_ML_APP_ML_RUNNER_SENSOR_EVENT_DESCR="accel_xyz"
2222
CONFIG_ML_APP_ML_RUNNER_WINDOW_SHIFT=0
2323
CONFIG_ML_APP_ML_RUNNER_FRAME_SHIFT=10
2424

25-
CONFIG_ML_APP_ML_STATE=y
26-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
25+
CONFIG_ML_APP_MODE=y
26+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2727

2828
CONFIG_CAF=y
2929

applications/machine_learning/configuration/thingy52_nrf52832/prj_release.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ CONFIG_ML_APP_ML_RUNNER_SENSOR_EVENT_DESCR="accel_xyz"
2222
CONFIG_ML_APP_ML_RUNNER_WINDOW_SHIFT=0
2323
CONFIG_ML_APP_ML_RUNNER_FRAME_SHIFT=10
2424

25-
CONFIG_ML_APP_ML_STATE=y
26-
CONFIG_ML_APP_ML_STATE_CONTROL_BUTTON_ID=0x0000
25+
CONFIG_ML_APP_MODE=y
26+
CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID=0x0000
2727

2828
CONFIG_CAF=y
2929

0 commit comments

Comments
 (0)