AirPlay fix & misc

- Spectrum scale fix
- Initialize more display parameters
- Reboot after 30s of no connection
- Reboot after IP address change
This commit is contained in:
philippe44
2020-03-07 14:01:53 -08:00
parent fae613eb33
commit 8e95bd3dd2
13 changed files with 127 additions and 62 deletions

View File

@@ -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;