Merged with httpd - work in progress

This commit is contained in:
Sebastien
2020-03-10 17:27:06 -04:00
parent 39058213fa
commit 2ab14d62be
20 changed files with 110 additions and 216 deletions

View File

@@ -76,18 +76,6 @@ const char * str_or_unknown(const char * str) { return (str?str:unknown_string_p
/* brief this is an exemple of a callback that you can setup in your own app to get notified of wifi manager event */
void cb_connection_got_ip(void *pvParameter){
static ip4_addr_t ip;
tcpip_adapter_ip_info_t ipInfo;
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ipInfo);
if (ip.addr && ipInfo.ip.addr != ip.addr) {
ESP_LOGW(TAG, "IP change, need to reboot");
if(!wait_for_commit()){
ESP_LOGW(TAG,"Unable to commit configuration. ");
}
esp_restart();
}
ip.addr = ipInfo.ip.addr;
ESP_LOGI(TAG, "I have a connection!");
messaging_post_message(MESSAGING_INFO,MESSAGING_CLASS_SYSTEM,"Wifi connected");
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
@@ -442,7 +430,7 @@ void app_main()
taskYIELD();
}
ESP_LOGI(TAG,"Updating firmware from link: %s",fwurl);
start_ota(fwurl);
start_ota(fwurl, NULL, 0);
}
else {
ESP_LOGE(TAG,"Restarted to application partition. We're not going to perform OTA!");