feature/http_call_send_json #3
1 changed files with 7 additions and 1 deletions
|
@ -174,7 +174,7 @@ void initSensors()
|
||||||
void wifiConnectionCheck()
|
void wifiConnectionCheck()
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((wifi_check_interval_counter + WIFI_CHECK_INTERVAL_MS) > millis() or WiFi.status() == WL_CONNECTED)
|
if ((wifi_check_interval_counter + WIFI_CHECK_INTERVAL_MS) > millis())
|
||||||
{
|
{
|
||||||
// if check interval is not exceeded abort check
|
// if check interval is not exceeded abort check
|
||||||
return;
|
return;
|
||||||
|
@ -182,6 +182,12 @@ void wifiConnectionCheck()
|
||||||
|
|
||||||
wifi_check_interval_counter = millis();
|
wifi_check_interval_counter = millis();
|
||||||
|
|
||||||
|
if (WiFi.status() == WL_CONNECTED)
|
||||||
|
{
|
||||||
|
// if we are connected
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
debug("no connection or time to check " + String(WiFi.status() == WL_CONNECTED));
|
debug("no connection or time to check " + String(WiFi.status() == WL_CONNECTED));
|
||||||
|
|
||||||
wifiConnect();
|
wifiConnect();
|
||||||
|
|
Loading…
Reference in a new issue