mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Merge remote-tracking branch 'origin/master' into master-cmake
Conflicts: components/raop/raop.c components/raop/rtp.c main/cmd_squeezelite.c
This commit is contained in:
@@ -73,6 +73,18 @@ extern void display_init(char *welcome);
|
||||
|
||||
/* 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!");
|
||||
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
||||
bWifiConnected=true;
|
||||
|
||||
Reference in New Issue
Block a user