mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Merged with httpd - work in progress
This commit is contained in:
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user