diff --git a/mkdocs/achandling.md b/mkdocs/achandling.md index 5063628..711c2fa 100644 --- a/mkdocs/achandling.md +++ b/mkdocs/achandling.md @@ -372,7 +372,7 @@ The above example handles in the handler for the values of a custom Web page. An To retrieve the values entered in a custom Web page you need to access the AutoConnectElement of the page that caused the request to this page and to do this, you use the [AutoConnect::where](api.md#where) function. The `AutoConnect::where` function returns a pointer to the AutoConnectAux object of the custom Web page that caused the HTTP request. !!! note "The where() function is available for only AutoConnectAux." - The `AutoConnect::where` function is available only for the AutoConnectAux object. It is invalid for HTTP requests from individual pages registered with the **on** handler of ESP8266WebServer/ESP32. In other words, the `AutoConnect::where` function only returns the last AutoConnecAux page called. + The `AutoConnect::where` function is available only for the AutoConnectAux object. It is invalid for HTTP requests from individual pages registered with the **on** handler of ESP8266WebServer/WebServer for ESP32. In other words, the `AutoConnect::where` function only returns the last AutoConnecAux page called. ### When setting the initial values @@ -541,7 +541,7 @@ void loop() { By giving a [pattern](apielements.md#pattern) to [AutoConnectInput](apielements.md#autoconenctinput), you can find errors in data styles while typing in custom Web pages. The pattern is specified by [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).[^2] If the value during input of AutoConnectInput does not match the regular expression specified in the pattern, its background color changes to pink. The following example shows the behavior when checking the IP address in the AutoConnectInput field. -[^2]: The pattern of AutoConnectInput conforms to javascript specification. +[^2]:Regular expression specification as a pattern of AutoConnectInput is [JavaScript compliant](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions). ```json hl_lines="10" { diff --git a/mkdocs/acintro.md b/mkdocs/acintro.md index 086fcaf..ff50e1e 100644 --- a/mkdocs/acintro.md +++ b/mkdocs/acintro.md @@ -15,7 +15,7 @@ AutoConnectAux is a container for AutoConnectElements. To make a custom Web page -The above figure shows a code sequence that declares AutoConnectElements and put in the AutoConnectAux container and integrates those into AutoConnect. It declares two text elements named *header* and *caption*, adds them to the AutoConnectAux object as *aux*, binds to an AutoConnect object named *portal*. This sequence is the basic procedure for creating custom Web pages with the sketch. Also, further explanation of AutoConnectElements is the [documentation](acelements.md). +The above figure shows a code sequence that declares AutoConnectElements and put in the AutoConnectAux container and integrates those into AutoConnect. It declares two text elements named *header* and *caption*, adds them to the AutoConnectAux object as *aux*, binds to an AutoConnect object named *portal*. This sequence is the basic procedure for creating custom Web pages with the sketch. The further explanation is available in section [AutoConnectElements](acelements.md) also. ## Custom Web pages in AutoConnect menu diff --git a/mkdocs/api.md b/mkdocs/api.md index 08fce79..cb76f02 100644 --- a/mkdocs/api.md +++ b/mkdocs/api.md @@ -270,7 +270,7 @@ typedef std::function DetectExit_ft
**Parameters**
softapIPAn IP address of SoftAP for the captive portal.
-
**Retuen value**
+
**Return value**
trueContinues captive portal handling.
falseCancel the captive portal. AutoConnect::begin function will return with a false.
@@ -298,8 +298,12 @@ Register the handler function for undefined URL request detected. ```cpp AutoConenctAux* where(void) ``` -Returns a pointer to the AutoConnectAux object of the custom Web page that caused the request to that page. This function is available only for the AutoConnectAux object. It is invalid for HTTP requests from individual pages registered with the **on** handler of ESP8266WebServer/ESP32. In other words, this function only returns the last AutoConnecAux page called. +Returns a pointer to the AutoConnectAux object of the custom Web page that caused the request to the page.
+AutoConnect identifies the URI (ie. the referrer URI) that caused the request each time from the client occurs and will save the URI If the request source is a custom Web page of AutoConnectAux. The **where** function returns a pointer of AutoConnectAux which is a URI of a least recent request from the custom Web page.
+This function is provided to access the fields (ie. the AutoConnectElements) with a custom Web page handler of a page and is available only for request source that is the custom Web pages. It is invalid for HTTP requests from individual pages registered with the **on** handler of ESP8266WebServer/WebServer for ESP32. In other words, this function only returns the AutoConnecAux page which is a least recently displayed.
-
**Retuen value**
+
**Return value**
A pointer to the AutoConnectAux that caused the request the page.
+ +The **where** function usage is described in the section [*Where to pick up the values*](achandling.md#where-to-pick-up-the-values). diff --git a/mkdocs/changelog.md b/mkdocs/changelog.md index d1dd44c..0de78da 100644 --- a/mkdocs/changelog.md +++ b/mkdocs/changelog.md @@ -10,7 +10,7 @@ - Supports [**AutoConnectConfig::hostName**](apiconfig.md#hostname). It activates ```WiFi.hostname()```/```WiFi.setHostName()```. - Supports the captive portal time-out. It can be controlled by [**AutoConnectConfig::portalTimeout**](apiconfig.md#portaltimeout) and [**AutoConnectConfig::retainPortal**](apiconfig.md#retainportal). -#### [0.9.6] Sep.27, 2018. +#### [0.9.6] Sept.27, 2018. - Improvement of RSSI detection for saved SSIDs. - Fixed disconnection SoftAP completely at the first connection phase of the [**AutoConnect::begin**](api.md#begin). diff --git a/mkdocs/datatips.md b/mkdocs/datatips.md index 2e47a2d..abbb546 100644 --- a/mkdocs/datatips.md +++ b/mkdocs/datatips.md @@ -46,7 +46,7 @@ tm.Minute = Minute; tm.Second = Second; ``` -### IP adderss +### IP address To convert a String to an IP address, use **IPAddress::fromString**. To stringize an instance of an IP address, use **IPAddress::toString**. @@ -172,5 +172,5 @@ Here, represent examples the typical regular expression for the input validation !!! caution "Contain with backquote" If that regular expression contains a backquote it must be escaped by backquote duplication. -[^2]: This regular expressiondoes not fully support the format of the e-mail address requested in [RFC5322](https://tools.ietf.org/html/rfc5322). +[^2]: This regular expression does not fully support the format of the e-mail address requested in [RFC5322](https://tools.ietf.org/html/rfc5322). [^3]: This regular expression does not consider semantic constraints. It is not possible to detect errors that do not exist as actual dates. diff --git a/mkdocs/images/process_begin.svg b/mkdocs/images/process_begin.svg index 0c37217..f34b54a 100644 --- a/mkdocs/images/process_begin.svg +++ b/mkdocs/images/process_begin.svg @@ -234,7 +234,7 @@ inkscape:pageshadow="2" inkscape:zoom="1.4142136" inkscape:cx="350.72493" - inkscape:cy="534.72635" + inkscape:cy="591.29489" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="true" @@ -272,7 +272,7 @@ image/svg+xml - + @@ -386,7 +386,7 @@ sodipodi:role="line">WiFi.scanNetworks + id="g1026"> LoadLoad BSSIDmatched credential + id="g1014"> WiFi.begin(SSID, PASSWORD) + sodipodi:role="line">WiFi.begin(SSID,PASSWORD) portalTimeout + id="g1006"> + style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" /> processNextRequest + + - - diff --git a/mkdocs/lsbegin.md b/mkdocs/lsbegin.md index a50fae7..e4f95f3 100644 --- a/mkdocs/lsbegin.md +++ b/mkdocs/lsbegin.md @@ -1,8 +1,6 @@ -## AutoCoonnect::begin logic sequence +## AutoConnect::begin logic sequence -Several parameters of [AutoConnectConfig](apiconfig.md) affect the behavior of [AutoConnect::begin](api.md#begin) function. Each parameter affects the behaves in complicated order and apply the followings with the priority in the logic sequence of AutoConnect::begin.[^1] - -[^1]:Another parameter as the [3rd parameter](api.md#begin) of AutoConnect::begin related to timeout constrains the connection wait time after WiFi.begin. It is the **CONNECTED** judgment of the above chart that it has an effect. +Several parameters as follows of [AutoConnectConfig](apiconfig.md) affect the behavior of [AutoConnect::begin](api.md#begin) function. Each parameter affects the behaves in interacted order with the priority and apply to the logic sequence of AutoConnect::begin. - [immediateStart](apiconfig.md#immediatestart) : The captive portal start immediately, without first WiFi.begin. - [autoReconenct](apiconfig.md#autoreconnect) : Attempt re-connect with past SSID by saved credential. @@ -13,8 +11,12 @@ You can use these parameters in combination with sketch requirements and need to -For example, AutoConnect::begin will not exits without the portalTimeout while the connection not establishes, but WebServer will start to work. So, your sketch may work seemingly, but it will close with inside a loop of the AutoConnect::begin function. Especially when invoking AutoConnect::begin in the **setup()**, execution control does not pass to the **loop()**. +For example, AutoConnect::begin will not exits without the **portalTimeout** while the connection not establishes, but WebServer will start to work. So, your sketch may work seemingly, but it will close with inside a loop of the AutoConnect::begin function. Especially when invoking AutoConnect::begin in the **setup()**, execution control does not pass to the **loop()**. -As different scenes, you may use the immediateStart effectively. Equipped the external switch to activate the captive portal with the ESP module, combined with the portalTime and the retainPortal it will become WiFi active connection feature. You can start AutoConnect::begin at any point in the **loop()**, which allows your sketch can behave both the offline mode and the online mode. +As different scenes, you may use the **immediateStart** effectively. Equipped the external switch to activate the captive portal with the ESP module, combined with the **portalTime** and the **retainPortal** it will become WiFi active connection feature. You can start AutoConnect::begin at any point in the **loop()**, which allows your sketch can behave both the offline mode and the online mode. Please consider these kinds of influence when you make sketches. + +!!! info "The AutoConnect::begin 3rd parameter" + Another parameter as the [3rd parameter](api.md#begin) of AutoConnect::begin related to timeout constrains the connection wait time after WiFi.begin. It is the **CONNECTED** judgment of the above chart that it has an effect. +