@ -85,7 +85,7 @@ void sendRedirect(String uri) {
server.client().stop();
}
bool atDetect(IPAddress softapIP) {
bool atDetect(IPAddress& softapIP) {
Serial.println("Captive portal started, SoftAP IP:" + softapIP.toString());
return true;
@ -88,7 +88,7 @@ void sendRedirect(String uri) {
@ -119,7 +119,7 @@ void sendRedirect(String uri) {
io.cancel();
@ -79,7 +79,7 @@ The captive portal will only be activated if 1st-WiFi::begin fails. Sketch can d
```cpp hl_lines="3 13"
AutoConnect Portal;
bool startCP(IPAddress ip) {
bool startCP(IPAddress& ip) {
digitalWrite(BUILTIN_LED, HIGH);
Serial.println("C.P. started, IP:" + WiFi.localIP().toString());
@ -315,7 +315,7 @@ Register the function which will call from AutoConnect at the start of the capti
An *fn* specifies the function called when the captive portal starts. Its prototype declaration is defined as "*DetectExit_ft*".
```cpp
typedef std::function<bool(IPAddress softapIP)> DetectExit_ft
typedef std::function<bool(IPAddress& softapIP)> DetectExit_ft
```
<dl class="apidl">
<dt>**Parameter**</dt>
@ -261,7 +261,7 @@ class AutoConnect {
bool load(Stream& aux);
#endif // !AUTOCONNECT_USE_JSON
typedef std::function<bool(IPAddress)> DetectExit_ft;
typedef std::function<bool(IPAddress&)> DetectExit_ft;
void onDetect(DetectExit_ft fn);
void onNotFound(WebServerClass::THandlerFunction fn);