OTA + nvs parameters bug fixes

This commit is contained in:
Sebastien
2019-10-15 21:01:22 -04:00
parent 47f24dbbfd
commit d4315f29ca
11 changed files with 591 additions and 134 deletions

View File

@@ -101,6 +101,14 @@ static void initialize_nvs() {
err = nvs_flash_init();
}
ESP_ERROR_CHECK(err);
err = nvs_flash_init_partition(settings_partition);
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase_partition(settings_partition));
err = nvs_flash_init_partition(settings_partition);
}
ESP_ERROR_CHECK(err);
}
char * process_ota_url(){
nvs_handle nvs;