Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebe3742

Browse files
committed
Merge branch 'support/led_light_pop_config' into 'master'
example(led_light): Add support for setting POP_TYPE from config See merge request app-frameworks/esp-rainmaker!574
2 parents 0702ea4 + 151b260 commit ebe3742

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/led_light/main/Kconfig.projbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ menu "Example Configuration"
99
GPIO number on which the "Boot" button is connected. This is generally used
1010
by the application for custom operations like toggling states, resetting to defaults, etc.
1111

12+
config APP_POP_TYPE
13+
int "Proof of Posession Type"
14+
default 1
15+
range 0 2
16+
help
17+
0: POP_TYPE_MAC
18+
1: POP_TYPE_RANDOM
19+
2: POP_TYPE_NONE
1220
endmenu

examples/led_light/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void app_main()
205205
* else, it will start Wi-Fi provisioning. The function will return
206206
* after a connection has been successfully established
207207
*/
208-
err = app_network_start(POP_TYPE_RANDOM);
208+
err = app_network_start((app_network_pop_type_t) CONFIG_APP_POP_TYPE);
209209
if (err != ESP_OK) {
210210
ESP_LOGE(TAG, "Could not start network. Aborting!!!");
211211
vTaskDelay(5000/portTICK_PERIOD_MS);

0 commit comments

Comments
 (0)