esp_mesh_set_active_duty_cycle() function
Set the device duty cycle and type - The range of dev_duty values is 1 to 100. The default value is 10. - dev_duty = 100, the PS will be stopped. - dev_duty is better to not less than 5. - dev_duty_type could be MESH_PS_DEVICE_DUTY_REQUEST or MESH_PS_DEVICE_DUTY_DEMAND. - If dev_duty_type is set to MESH_PS_DEVICE_DUTY_REQUEST, the device will use a nwk_duty provided by the network. - If dev_duty_type is set to MESH_PS_DEVICE_DUTY_DEMAND, the device will use the specified dev_duty. @attention This API can be called at any time after mesh is started.
Arguments
dev_duty
device duty cycle
dev_duty_type
device PS duty cycle type, not accept MESH_PS_NETWORK_DUTY_MASTER
Return value
- ESP_OK - ESP_FAIL