diff --git a/mkdocs/achandling.md b/mkdocs/achandling.md index 187dc25..2b6af1a 100644 --- a/mkdocs/achandling.md +++ b/mkdocs/achandling.md @@ -13,10 +13,10 @@ The AutoConnectAux class has several functions to manipulate AutoConnectElements To add AutoConnectElment(s) to an AutoConnectAux object, use the add function. ```cpp -void AutoConnectAux::add(AutoConenctElement& addon) +void AutoConnectAux::add(AutoConnectElement& addon) ``` ```cpp -void AutoConnectAux::add(AutoConenctElementVT addons) +void AutoConnectAux::add(AutoConnectElementVT addons) ``` The add function adds the specified AutoConnectElement to AutoConnectAux. The AutoConnectElementVT type is the [*std::vector*](https://en.cppreference.com/w/cpp/container/vector) of the [*reference wrapper*](https://en.cppreference.com/w/cpp/utility/functional/reference_wrapper) to AutoConnectElements, and you can add these elements in bulk by using the [*list initialization*](https://en.cppreference.com/w/cpp/language/list_initialization) with the sketch. @@ -70,7 +70,7 @@ AutoConnectElement* AutoConnectAux::getElement(const String& name) ``` ```cpp -T& AutoConenctAux::getElement(const String& name) +T& AutoConnectAux::getElement(const String& name) ``` ```cpp @@ -108,10 +108,10 @@ The AutoConnectElement type behaves as a variant of other element types. Therefo ```cpp const String auxJson = String("{\"title\":\"Page 1 title\",\"uri\":\"/page1\",\"menu\":true,\"element\":[{\"name\":\"caption\",\"type\":\"ACText\",\"value\":\"hello, world\"}]}"); -AutoConenct portal; +AutoConnect portal; portal.load(auxJson); AutoConnectAux* aux = portal.aux("/page1"); // Identify the AutoConnectAux instance with uri -AutoConenctText& text = aux->getElement("caption"); // Cast to real type and access members +AutoConnectText& text = aux->getElement("caption"); // Cast to real type and access members Serial.println(text.value); ``` diff --git a/mkdocs/acupload.md b/mkdocs/acupload.md index 604f00d..434ff12 100644 --- a/mkdocs/acupload.md +++ b/mkdocs/acupload.md @@ -125,7 +125,7 @@ The AutoConnect built-in upload handler can save the upload file to three locati 2. SD device externally connected to the ESP8266/ESP32 module 3. Other character devices -You can specify the device type to save with the [**store**](acelements.md#store) attribute of AutoConenctFile, and it accepts the following values: +You can specify the device type to save with the [**store**](acelements.md#store) attribute of AutoConnectFile, and it accepts the following values: - Flash : `AC_File_FS` for the API parameter or `fs` for the JSON document - SD : `AC_File_SD` for the API parameter or `sd` for the JSON document diff --git a/mkdocs/apiaux.md b/mkdocs/apiaux.md index bb12b56..1679b15 100644 --- a/mkdocs/apiaux.md +++ b/mkdocs/apiaux.md @@ -195,7 +195,7 @@ Load specified element from JSON document into AutoConnectAux. The JSON document ```cpp 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). +Set or reset the display as menu item for this AutoConnectAux. This function programmatically manipulates the menu parameter of the [AutoConnectAux constructor](apiaux.md#autoconnectaux).
**Parameter**
trueShow on the menu.
@@ -255,7 +255,7 @@ typedef struct { ```cpp 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. +Release a specified AutoConnectElement from AutoConnectAux. 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.
**Parameter**
nameSpecifies the name of AutoConnectElements to be released.
@@ -269,7 +269,7 @@ Release a specified AutoConnectElement from AutoConenctAux. The release function ```cpp size_t saveElement(Stream& out, std::vector const& names = {}) ``` -Write elements of AutoConnectAux to the stream. The saveElement function outputs the specified AutoConenctElements as a JSON document using the [prettyPrintTo](https://arduinojson.org/v5/api/jsonobject/prettyprintto/) function of the [ArduinoJson](https://arduinojson.org/) library. +Write elements of AutoConnectAux to the stream. The saveElement function outputs the specified AutoConnectElements as a JSON document using the [prettyPrintTo](https://arduinojson.org/v5/api/jsonobject/prettyprintto/) function of the [ArduinoJson](https://arduinojson.org/) library.
**Parameters**
outOutput stream to be output. SPIFFS, SD also Serial can be specified generally.
diff --git a/src/AutoConnectAux.cpp b/src/AutoConnectAux.cpp index dc4c384..ceccd71 100644 --- a/src/AutoConnectAux.cpp +++ b/src/AutoConnectAux.cpp @@ -327,7 +327,7 @@ void AutoConnectAux::_concat(AutoConnectAux& aux) { /** * Register the AutoConnect that owns itself. - * AutoConenctAux needs to access the AutoConnect member. Also + * AutoConnectAux needs to access the AutoConnect member. Also * AutoConnectAux is cataloged by chain list. The _join function * registers AutoConnect in the following AutoConnectAux chain list. * @param ac A reference of AutoConnect. diff --git a/src/AutoConnectElement.h b/src/AutoConnectElement.h index 33f5fb7..e25043a 100644 --- a/src/AutoConnectElement.h +++ b/src/AutoConnectElement.h @@ -8,7 +8,7 @@ */ #ifndef _AUTOCONNECTELEMENT_H_ -#define _AUTOCONENCTELEMENT_H_ +#define _AUTOCONNECTELEMENT_H_ #include "AutoConnectElementBasis.h" #ifdef AUTOCONNECT_USE_JSON diff --git a/src/AutoConnectUpdate.h b/src/AutoConnectUpdate.h index 61b8963..e93a6cd 100644 --- a/src/AutoConnectUpdate.h +++ b/src/AutoConnectUpdate.h @@ -136,7 +136,7 @@ class AutoConnectUpdateAct : public AutoConnectUpdateVoid, public HTTPUpdateClas // Attribute definition of the element to be placed on the update page. typedef struct { const ACElement_t type; - const char* name; /**< Name to assign to AutoConenctElement */ + const char* name; /**< Name to assign to AutoConnectElement */ const char* value; /**< Value owned by an element */ const char* peculiar; /**< Specific ornamentation for the element */ } ACElementProp_t;