stable initial OTA!

This commit is contained in:
Sebastien
2019-09-29 08:27:12 -04:00
parent e416fab2ef
commit da610effc9
4 changed files with 30 additions and 11 deletions

View File

@@ -102,13 +102,15 @@ void app_main()
wifi_manager_set_callback(WIFI_EVENT_STA_DISCONNECTED, &cb_connection_sta_disconnected);
char * fwurl = get_nvs_value_alloc(NVS_TYPE_STR, "fwurl");
if(fwurl){
if(fwurl && strlen(fwurl)>0){
while(!bWifiConnected){
wait_for_wifi();
}
ESP_LOGI(TAG,"Updating firmware from link: %s",fwurl);
start_ota(fwurl);
}
console_start();
else
{
console_start();
}
}