Changed interface of the onDetect exit routine's parameter

enhance/v120
Hieromon Ikasamo 4 years ago
parent 2b7c49ae18
commit e9fda58180
  1. 2
      examples/HandleClient/HandleClient.ino
  2. 2
      examples/HandlePortal/HandlePortal.ino
  3. 2
      examples/HandlePortalEX/HandlePortalEX.ino
  4. 2
      mkdocs/advancedusage.md
  5. 2
      mkdocs/api.md
  6. 2
      src/AutoConnect.h

@ -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) {
server.client().stop();
}
bool atDetect(IPAddress softapIP) {
bool atDetect(IPAddress& softapIP) {
Serial.println("Captive portal started, SoftAP IP:" + softapIP.toString());
return true;
}

@ -119,7 +119,7 @@ void sendRedirect(String uri) {
io.cancel();
}
bool atDetect(IPAddress softapIP) {
bool atDetect(IPAddress& softapIP) {
Serial.println("Captive portal started, SoftAP IP:" + softapIP.toString());
return true;
}

@ -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());
return true;

@ -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);

Loading…
Cancel
Save