Typo corrected

pull/57/head
Hieromon Ikasamo 5 years ago
parent 8ed91039c3
commit 9b4bf2296c
  1. 2
      mkdocs/acupload.md
  2. 26
      mkdocs/api.md
  3. 8
      mkdocs/apiaux.md
  4. 16
      mkdocs/apielements.md

@ -279,7 +279,7 @@ class AutoConnectUploadFS : public AutoConnectUploadHandler {
### <i class="fa fa-code"></i> Register custom upload handler
In order to upload a file by the custom uploader, it is necessary to register it to the custom Web page beforehand. To register a custom uploader, specify the custom uploader class for the template argument and use the [AutoConnectAux::onUpload](apiaux.md#onupload) function.
In order to upload a file by the custom uploader, it is necessary to register it to the custom Web page beforehand. To register a custom uploader, specify the custom uploader class name in the template argument of the [AutoConnectAux::onUpload](apiaux.md#onupload) function and invokes it.
The rough structure of the sketches that completed these implementations will be as follows:

@ -57,7 +57,7 @@ Run the AutoConnect site using the externally ensured ESP8266WebServer for ESP82
The [**handleClient**](api.md#handleclient) function of AutoConnect can include the response of the URI handler added by the user using the "*on*" function of ESP8266WebServer/WebServer. If ESP8266WebServer/WebServer is assigned internally by AutoConnect, the sketch can obtain that reference with the [**host**](api.md#host) function.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">webServer</span><span class="apidesc">A reference of ESP8266WebServer or WebServer instance.</span></dd>
</dl>
@ -70,7 +70,7 @@ AutoConnectAux* aux(const String& uri) const
```
Returns a pointer to AutoConnectAux with the URI specified by *uri*. If AutoConnectAux with that URI is not bound, it returns **nullptr**.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">uri</span><span class="apidesc">A string of the URI.</span></dd>
<dt>**Return value**</dt>
<dd>A Pointer of the AutoConnectAux instance.</dd>
@ -124,7 +124,7 @@ Set SoftAP's WiFi configuration and static IP configuration.
### <i class="fa fa-caret-right"></i> end
```cpp
void end()
void end(void)
```
Stops AutoConnect captive portal service. Release ESP8266WebServer/WebServer and DNSServer.
@ -135,7 +135,7 @@ Stops AutoConnect captive portal service. Release ESP8266WebServer/WebServer and
### <i class="fa fa-caret-right"></i> handleClient
```cpp
void handleClient()
void handleClient(void)
```
Process the AutoConnect menu interface. The handleClient() function of the ESP8266WebServer/WebServer hosted by AutoConnect is also called from within AutoConnect, and the client request handlers contained in the user sketch are also handled.
@ -143,7 +143,7 @@ Process the AutoConnect menu interface. The handleClient() function of the ESP82
### <i class="fa fa-caret-right"></i> handleRequest
```cpp
void handleRequest()
void handleRequest(void)
```
Handling for the AutoConnect menu request.
@ -159,7 +159,7 @@ void home(String& uri)
Put a user site's home URI. The URI specified by home is linked from "HOME" in the AutoConnect menu.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">uri</span><span class="aidesc">A URI string of user site's home path.</span></dd>
</dl>
@ -168,13 +168,13 @@ Put a user site's home URI. The URI specified by home is linked from "HOME" in t
- For ESP8266
```cpp
ESP8266WebServer& host()
ESP8266WebServer& host(void)
```
- For ESP32
```cpp
WebServer& host()
WebServer& host(void)
```
Returns the reference of the ESP8266WebServer/WebServer which is allocated in AutoConnect automatically.
@ -204,7 +204,7 @@ void join(std::vector<std::reference_wrapper<AutoConnectAux>> aux)
```
Join the AutoConnectAux object to AutoConnect. AutoConnectAux objects can be joined one by one, or joined altogether. The AutoConnectAux object joined by the join function can be handled from the AutoConnect menu.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">aux</span><span class="apidesc">Reference to AutoConnectAux. It can be std::vector of std::reference_wrapper of AutoConnectAux with [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization).</span></dd>
</dl>
@ -221,7 +221,7 @@ bool load(Stream& aux)
```
Load JSON document of AutoConnectAux which contains AutoConnectElements. If there is a syntax error in the JSON document, false is returned.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">aux</span><span class="apidesc">The input string to be loaded.</span></dd>
<dt>**Return value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">The JSON document as AutoConnectAux successfully loaded.</span></dd>
@ -257,7 +257,7 @@ void onDetect(DetectExit_ft fn)
```
Register the function which will call from AutoConnect at the start of the captive portal.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">fn</span><span class="apidesc">Function called at the captive portal start.</span></dd>
</dl>
@ -268,7 +268,7 @@ An *fn* specifies the function called when the captive portal starts. Its protot
typedef std::function<bool(IPAddress softapIP)> DetectExit_ft
```
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">softapIP</span><span class="apidesc">An IP address of SoftAP for the captive portal.</span></dd>
<dt>**Return value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">Continues captive portal handling.</span></dd>
@ -290,7 +290,7 @@ void onNotFound(WebServer::THandlerFunction fn)
```
Register the handler function for undefined URL request detected.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">fn</span><span class="apidesc">A function of the "not found" handler.</span></dd>
</dl>

@ -22,7 +22,7 @@ AutoConnectElement& operator[](const String& name)
```
Returns a reference to the element specified by **name**. An operator `[]` is a shortcut for [getElement](apiaux.md#getelement) function with the reference casting. Unlike getElement, which returns a pointer to that element, an operator `[]` returns a reference to that element. You also need to cast the return value to the actual type, just like the getElement function.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">name</span><span class="apidesc">Name of the AutoConnectElements to be retrieved.</span></dd>
<dt>**Return value**</dt><dd>A reference to AutoConnectElement. It is different from the actual element type.</dd>
</dl>
@ -94,7 +94,7 @@ bool load(Stream& in)
```
Load all AutoConnectElements elements from JSON document into AutoConnectAux as custom Web pages. The JSON document specified by the load function must be the [document structure](acjson.md#json-objects-elements-for-the-custom-web-page) of AutoConnectAux. Its JSON document can describe multiple pages as an array.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">in</span><span class="apidesc">Specifies the JSON document to be load. The load function can input the following objects.
- String : Read-only String
@ -159,7 +159,7 @@ void menu(const bool post)
```
Set or reset the display as menu item for this AutoConnectAux. This function programmatically manipulates the menu parameter of the [AutoConenctAux constructor](apiaux.md#autoconnectaux).
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">true</span><span class="apidesc">Show on the menu.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">Hidden on the menu.</span></dd>
</dl>
@ -218,7 +218,7 @@ bool release(const String& name)
```
Release a specified AutoConnectElement from AutoConenctAux. The release function is provided to dynamically change the structure of the custom Web pages with the sketch. By combining the release function and the [add](apiaux.md#add) function or the [loadElement](apiaux.md#loadelement) function, the sketch can change the style of the custom Web page according to its behavior.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">name</span><span class="apidesc">Specifies the name of AutoConnectElements to be released.</span></dd>
<dt>**Return value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">The AutoConnectElement successfully released.</span></dd>

@ -166,7 +166,7 @@ AutoConnectElement& as<T>(void)
```
Casts the reference to the AutoConnectElement the specified type.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">T</span><span class="apidesc">The element type. AutoConnectElements type such as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).</span></dd>
<dt>**Return value**</dt>
<dd>A reference to the AutoConnectElement with actual type.</dd>
@ -421,7 +421,7 @@ void add(const String& value)
```
Adds an option for the radio button.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">value</span><span class="apidesc">An option string to add to the radio button.</span></dd>
</dl>
@ -432,7 +432,7 @@ void check(const String& value)
```
Indicates the check of the specified option for the radio buttons. You can use the **check** function for checking dynamically with arbitrary of the radio button.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">value</span><span class="apidesc">An option string to be checked.</span></dd>
</dl>
@ -443,7 +443,7 @@ void empty(const size_t reserve = 0)
```
Clear the array of option strings that AutoConnectRadio has in the values. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">reserve</span><span class="apidesc">Reserved size of a container for the radio button option strings.</span></dd>
</dl>
@ -454,7 +454,7 @@ const String& operator[] (const std::size_t n)
```
Returns a value string of the index specified by **_n_**.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">n</span><span class="apidesc">Index of values array to return. Its base number is 0.</span></dd>
<dt>**Return value**</dt>
<dd>A reference of a value string indexed by the specified the **n**.</dd>
@ -542,7 +542,7 @@ void add(const String& option)
```
Adds a selectable option string for the selection list.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">option</span><span class="apidesc">A string of selectable item to be contained in the select element.</span></dd>
</dl>
@ -553,7 +553,7 @@ void empty(const size_t reserve = 0)
```
Clear the array of options list that AutoConnectSelect has in the options. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">reserve</span><span class="apidesc">Reserved size of a container for the options.</span></dd>
</dl>
@ -564,7 +564,7 @@ const String& operator[] (const std::size_t n)
```
Returns an option string of the index specified by **_n_**.
<dl class="apidl">
<dt>**Parameters**</dt>
<dt>**Parameter**</dt>
<dd><span class="apidef">n</span><span class="apidesc">Index of options array to return. Its base number is 0.</span></dd>
<dt>**Return value**</dt>
<dd>A reference of a option string indexed by the specified the **n**.</dd>

Loading…
Cancel
Save