diff --git a/app/src/modules/network/Kconfig.network b/app/src/modules/network/Kconfig.network index e2430d52..8db334e6 100644 --- a/app/src/modules/network/Kconfig.network +++ b/app/src/modules/network/Kconfig.network @@ -21,6 +21,8 @@ config APP_NETWORK_EXEC_TIME_SECONDS_MAX help Maximum time allowed for a single execution of the module's thread loop. +config APP_NETWORK_SAMPLE_NETWORK_QUALITY + bool "Sample network quality" module = APP_NETWORK module-str = Network diff --git a/app/src/modules/network/network.c b/app/src/modules/network/network.c index f029813a..1ad39b13 100644 --- a/app/src/modules/network/network.c +++ b/app/src/modules/network/network.c @@ -238,7 +238,10 @@ static void state_sampling_run(void *obj) if (trigger_type == TRIGGER_DATA_SAMPLE) { LOG_DBG("Data sample trigger received, getting network quality data"); - sample_network_quality(); + + if (IS_ENABLED(CONFIG_APP_NETWORK_SAMPLE_NETWORK_QUALITY)) { + sample_network_quality(); + } } } } diff --git a/tests/module/network/CMakeLists.txt b/tests/module/network/CMakeLists.txt index fff3005c..0f92afcb 100644 --- a/tests/module/network/CMakeLists.txt +++ b/tests/module/network/CMakeLists.txt @@ -32,6 +32,7 @@ target_compile_definitions(app PRIVATE -DCONFIG_APP_NETWORK_MESSAGE_QUEUE_SIZE=5 -DCONFIG_APP_NETWORK_EXEC_TIME_SECONDS_MAX=1 -DCONFIG_APP_NETWORK_WATCHDOG_TIMEOUT_SECONDS=2 + -DCONFIG_APP_NETWORK_SAMPLE_NETWORK_QUALITY -DCONFIG_NET_MGMT_EVENT )