Typo corrected

pull/41/head
Hieromon Ikasamo 5 years ago
parent 31801adcc8
commit 7418f86c1e
  1. 4
      mkdocs/achandling.md
  2. 2
      mkdocs/acintro.md
  3. 10
      mkdocs/api.md
  4. 2
      mkdocs/changelog.md
  5. 4
      mkdocs/datatips.md
  6. 49
      mkdocs/images/process_begin.svg
  7. 14
      mkdocs/lsbegin.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.
### <i class="fa fa-desktop"></i> 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"
{

@ -15,7 +15,7 @@ AutoConnectAux is a container for AutoConnectElements. To make a custom Web page
<img src="images/ac_declaration.svg">
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

@ -270,7 +270,7 @@ typedef std::function<bool(IPAddress softapIP)> DetectExit_ft
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">softapIP</span><span class="apidesc">An IP address of SoftAP for the captive portal.</span></dd>
<dt>**Retuen value**</dt>
<dt>**Return value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">Continues captive portal handling.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">Cancel the captive portal. AutoConnect::begin function will return with a false.</span></dd>
</dl>
@ -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.<br>
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.<br>
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.
<dl class="apidl">
<dt>**Retuen value**</dt>
<dt>**Return value**</dt>
<dd>A pointer to the AutoConnectAux that caused the request the page.</dd>
</dl>
The **where** function usage is described in the section [*Where to pick up the values*](achandling.md#where-to-pick-up-the-values).

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

@ -46,7 +46,7 @@ tm.Minute = Minute;
tm.Second = Second;
```
### <i class="fa fa-exchange"></i> IP adderss
### <i class="fa fa-exchange"></i> 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.

@ -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 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -386,7 +386,7 @@
sodipodi:role="line">WiFi.scanNetworks</tspan></text>
</g>
<g
id="g11063">
id="g1026">
<rect
ry="0.26458257"
rx="0.26458332"
@ -406,7 +406,7 @@
y="95.511253"
x="42.913143"
id="tspan9136-4-0-7"
sodipodi:role="line">Load</tspan><tspan
sodipodi:role="line">Load BSSID</tspan><tspan
id="tspan9414"
style="line-height:1em;stroke-width:0.26458332"
y="98.686256"
@ -414,28 +414,27 @@
sodipodi:role="line">matched credential</tspan></text>
</g>
<g
id="g9476"
transform="translate(-43.65625,-2.6458341)">
id="g1014">
<rect
ry="0.26458257"
rx="0.26458332"
y="106.49999"
x="75.40625"
y="103.85416"
x="31.75"
height="7.9375019"
width="52.916668"
id="rect9134-4-7-5"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.26458329;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9138-7-3-3"
y="111.34698"
x="77.640999"
y="108.70114"
x="34.534584"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="111.34698"
x="77.640999"
y="108.70114"
x="34.534584"
id="tspan9136-4-0-4"
sodipodi:role="line">WiFi.begin(SSID, PASSWORD)</tspan></text>
sodipodi:role="line">WiFi.begin(SSID,PASSWORD)</tspan></text>
</g>
<g
id="g9353-2"
@ -637,7 +636,7 @@
sodipodi:role="line">portalTimeout</tspan></text>
</g>
<g
id="g10490">
id="g1006">
<rect
ry="0.26458257"
rx="0.26458332"
@ -646,7 +645,7 @@
height="10.583351"
width="37.041668"
id="rect9134-4-7-4-6-9"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.26458329;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
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" />
<text
id="text9138-7-3-9-0-0"
y="207.53156"
@ -663,17 +662,17 @@
y="211.50031"
x="41.894592"
sodipodi:role="line">processNextRequest</tspan></text>
<path
inkscape:connector-curvature="0"
id="path9865"
d="m 41.0104,203.33749 v 10.58334"
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.66" />
<path
inkscape:connector-curvature="0"
id="path9865-8"
d="m 75.40623,203.3375 v 10.58334"
style="fill:none;stroke:#000000;stroke-width:0.26458333;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;opacity:0.66" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 41.0104,203.33749 v 10.58334"
id="path9865"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 75.40623,203.3375 v 10.58334"
id="path9865-8"
inkscape:connector-curvature="0" />
<g
id="g9353-2-8"
transform="translate(-15.875002,88.900003)">

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

@ -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
<img align="center" src="images/process_begin.svg">
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.

Loading…
Cancel
Save