main/co2meter.c

changeset 52
90a36619b07b
parent 51
5035385299f6
child 57
232f318a6b51
--- a/main/co2meter.c	Sun Apr 05 19:17:17 2020 +0200
+++ b/main/co2meter.c	Mon Apr 06 10:42:08 2020 +0200
@@ -28,7 +28,7 @@
 extern EventGroupHandle_t		xEventGroupUser;
 extern int				count_pub;			///< Published MQTT messages in transit
 extern uint32_t				AlarmTimer;			///< Alarm timer
-
+extern uint32_t				err_connect;			///< Connect error counter
 
 
 void app_main()
@@ -160,6 +160,7 @@
 		    if (! ready_WiFi()) { /* If WiFi was lost, try a new connection */
 			ESP_LOGI(TAG, "Try WiFi restore");
 			request_WiFi();
+			err_connect++;
 		    }
 		    break;
 

mercurial