mesh/ps: network duty signaling

This commit is contained in:
shenjun
2021-03-12 16:39:24 +08:00
committed by bot
parent 3bc3407aeb
commit f9fe524c32
4 changed files with 22 additions and 12 deletions
@@ -50,7 +50,7 @@ menu "Example Configuration"
int "Mesh PS device duty cycle"
depends on MESH_ENABLE_PS
range 1 100
default 12
default 10
help
Mesh PS device duty cycle.
@@ -58,7 +58,7 @@ menu "Example Configuration"
int "Mesh PS network duty cycle"
depends on MESH_ENABLE_PS
range 1 100
default 12
default 10
help
Mesh PS network duty cycle.
@@ -438,9 +438,9 @@ void app_main(void)
/* mesh start */
ESP_ERROR_CHECK(esp_mesh_start());
#ifdef CONFIG_MESH_ENABLE_PS
/* set the device active duty cycle. (default:12, MESH_PS_DEVICE_DUTY_REQUEST) */
/* set the device active duty cycle. (default:10, MESH_PS_DEVICE_DUTY_REQUEST) */
ESP_ERROR_CHECK(esp_mesh_set_active_duty_cycle(CONFIG_MESH_PS_DEV_DUTY, CONFIG_MESH_PS_DEV_DUTY_TYPE));
/* set the network active duty cycle. (default:12, -1, MESH_PS_NETWORK_DUTY_APPLIED_ENTIRE) */
/* set the network active duty cycle. (default:10, -1, MESH_PS_NETWORK_DUTY_APPLIED_ENTIRE) */
ESP_ERROR_CHECK(esp_mesh_set_network_duty_cycle(CONFIG_MESH_PS_NWK_DUTY, CONFIG_MESH_PS_NWK_DUTY_DURATION, CONFIG_MESH_PS_NWK_DUTY_RULE));
#endif
ESP_LOGI(MESH_TAG, "mesh starts successfully, heap:%d, %s<%d>%s, ps:%d\n", esp_get_minimum_free_heap_size(),