 {
   Serial.println("Factory Reset");
   wfCfg.resetCfg(1);
-  delay(1000);
-  ESP.reset(); 
+  reboot();
 }
 
 void setup()

    Serial.println("timed out and failed to connect");
    Serial.println("rebooting...");
    //reset and try again, or maybe put it to deep sleep
    ESP.reset();
    //   we never get here.
  }


#endif // !WIFI_MGR


void reboot()
{
  WiFi.disconnect();
  delay(1000);
  ESP.reset();
}

void initTest()
{
