log reset. log AP index/count info in connect.

This commit is contained in:
Morgan Allen 2018-09-21 21:35:34 -07:00
parent b7b28eadec
commit eb59d7877a

View file

@ -99,6 +99,8 @@ void wifi_manager_connect() {
} }
}; };
ESP_LOGI(TAG, "connecting to AP %d of %d", ap_store.last, ap_store.count);
memcpy((char *)&wifi_config.sta.ssid, ap_store.aps[ap_store.last].ssid, strlen(ap_store.aps[ap_store.last].ssid) + 1); memcpy((char *)&wifi_config.sta.ssid, ap_store.aps[ap_store.last].ssid, strlen(ap_store.aps[ap_store.last].ssid) + 1);
memcpy((char *)&wifi_config.sta.password, ap_store.aps[ap_store.last].password, strlen(ap_store.aps[ap_store.last].password) + 1); memcpy((char *)&wifi_config.sta.password, ap_store.aps[ap_store.last].password, strlen(ap_store.aps[ap_store.last].password) + 1);
@ -152,6 +154,8 @@ void wifi_manager_save_config() {
}; };
void wifi_manager_reset_store() { void wifi_manager_reset_store() {
ESP_LOGW(TAG, "resetting store");
memset(&ap_store, 0, sizeof(ap_store)); memset(&ap_store, 0, sizeof(ap_store));
ap_store.magic = WIFI_MANAGER_MAGIC; ap_store.magic = WIFI_MANAGER_MAGIC;