Purbright_Esp32_PlatformIO/lib/PurBrightLib/network.cpp
void Network::CheckNetworkLoop()
{
  // run current function every 5 seconds
  
  int currentWifiStatus = CheckWifiState();

  if (currentWifiStatus != 1)
  {
    wifiConnected = false;
    SERIAL_DEBUG_LN(F("Wifi is not connected"));
  }
  else
  {
    SERIAL_DEBUG_LN(F("Wifi is connected and not connected to a network"));
  }
  if (currentWifiStatus == WL_CONNECTED && !wifiConnected)
  {
    wifiConnected = true;
    Serial.print("INFO: WiFi Connected! Open http://");
    Serial.print(WiFi.localIP());
    SERIAL_DEBUG_LN(" in your browser");
  }
}
/******************************************************************************
 * Function: Check Network Connection Loop
 * Description: This function checks the network connection and reconnects if necessary - is called in the loop() function every 5 seconds
 * Parameters: None
 * Return: None
 ******************************************************************************/
Check Network Connection Loop
Description: This function checks the network connection and reconnects if necessary - is called in the loop() function every 5 seconds
Parameters: None
Return: None
Check Network Connection Loop Description : This function checks the network connection and reconnects if necessary - is called in the loop () function every 5 seconds Parameters : None Return : None
void Network::CheckNetworkLoop()
{
  int currentWifiStatus = CheckWifiState();
  if (currentWifiStatus != 1)
  {
    wifiConnected = false;
    SERIAL_DEBUG_LN(F("Wifi is not connected"));
  }
  else
  {
    SERIAL_DEBUG_LN(F("Wifi is connected and not connected to a network"));
  }
  if (currentWifiStatus == WL_CONNECTED && !wifiConnected)
  {
    wifiConnected = true;
    Serial.print("INFO: WiFi Connected! Open http://");
    Serial.print(WiFi.localIP());
    SERIAL_DEBUG_LN(" in your browser");
  }
}
void Network :: CheckNetworkLoop ( ) { int currentWifiStatus = CheckWifiState ( ) ; if ( currentWifiStatus != 1 ) { wifiConnected = false ; SERIAL_DEBUG_LN ( F ( " " ) ) ; } else { SERIAL_DEBUG_LN ( F ( " " ) ) ; } if ( currentWifiStatus == WL_CONNECTED && ! wifiConnected ) { wifiConnected = true ; Serial . print ( " " ) ; Serial . print ( WiFi . localIP ( ) ) ; SERIAL_DEBUG_LN ( " " ) ; } }
Function: Check Network Connection Loop
 Description: This function checks the network connection and reconnects if necessary - is called in the loop() function every 5 seconds
 Parameters: None
 Return: None
Function : Check Network Connection Loop Description : This function checks the network connection and reconnects if necessary - is called in the loop () function every 5 seconds Parameters : None Return : None
// run current function every 5 seconds