allow bypassing the wifi manager

to disable wifi manager, use command:  nvs_set bypass_wm str -v "1"
to enable wifi manager, use command:  nvs_set bypass_wm str -v "0"
This commit is contained in:
Sebastien
2019-10-31 17:42:45 -04:00
parent 9f3f9bfbd2
commit 2ed8b50fbe
6 changed files with 238 additions and 42 deletions

View File

@@ -136,11 +136,13 @@ esp_err_t guided_boot(esp_partition_subtype_t partition_subtype)
static int restart(int argc, char **argv)
{
ESP_LOGI(TAG, "Restarting");
guided_boot(ESP_PARTITION_SUBTYPE_APP_OTA_0);
// If we're still alive, then there may not be an ota partition to boot from
guided_boot(ESP_PARTITION_SUBTYPE_APP_FACTORY);
return 0; // return fail. This should never return... we're rebooting!
ESP_LOGW(TAG, "Restarting");
esp_restart();
// guided_boot(ESP_PARTITION_SUBTYPE_APP_OTA_0);
// // If we're still alive, then there may not be an ota partition to boot from
// guided_boot(ESP_PARTITION_SUBTYPE_APP_FACTORY);
// return 0; // return fail. This should never return... we're rebooting!
}
esp_err_t guided_restart_ota(){
guided_boot(ESP_PARTITION_SUBTYPE_APP_OTA_0);