log reset. log AP index/count info in connect.
This commit is contained in:
		
							parent
							
								
									b7b28eadec
								
							
						
					
					
						commit
						eb59d7877a
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -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.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() { | ||||
|   ESP_LOGW(TAG, "resetting store"); | ||||
| 
 | ||||
|   memset(&ap_store, 0, sizeof(ap_store)); | ||||
| 
 | ||||
|   ap_store.magic = WIFI_MANAGER_MAGIC; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue