8000 esp32: Only update the WiFi on boot if the new value is different. · fsaf11/ESP32-micropython-lora@eb31d05 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb31d05

Browse files
author
Daniel Campora
committed
esp32: Only update the WiFi on boot if the new value is different.
1 parent 446be04 commit eb31d05

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

esp32/pycom_config.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ void config_get_sigfox_private_key (uint8_t *private_key) {
7474
}
7575

7676
bool config_set_wifi_on_boot (uint8_t wifi_on_boot) {
77-
pycom_config.wifi_on_boot = wifi_on_boot;
78-
return config_write();
77+
if (pycom_config.wifi_on_boot != wifi_on_boot) {
78+
pycom_config.wifi_on_boot = wifi_on_boot;
79+
return config_write();
80+
}
81+
return true;
7982
}
8083

8184
bool config_get_wifi_on_boot (void) {

0 commit comments

Comments
 (0)
0