Merge pull request #110 from Hieromon/Enhance/v0911

Release v0.9.11
pull/112/head
Hieromon Ikasamo 5 years ago committed by GitHub
commit 4bd887a179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      README.md
  2. 694
      docs/404.html
  3. 2119
      docs/acelements.html
  4. 1187
      docs/achandling.html
  5. 893
      docs/acintro.html
  6. 1233
      docs/acjson.html
  7. 959
      docs/acupload.html
  8. 1296
      docs/advancedusage.html
  9. 1111
      docs/api.html
  10. 1061
      docs/apiaux.html
  11. 1281
      docs/apiconfig.html
  12. 3080
      docs/apielements.html
  13. 809
      docs/apiextra.html
  14. 4
      docs/assets/javascripts/application.245445c6.js
  15. 2
      docs/assets/stylesheets/application-palette.01803549.css
  16. 1
      docs/assets/stylesheets/application.0284f74d.css
  17. 1
      docs/assets/stylesheets/application.4031d38b.css
  18. 997
      docs/basicusage.html
  19. 956
      docs/changelog.html
  20. 877
      docs/colorized.html
  21. 1013
      docs/credit.html
  22. 973
      docs/datatips.html
  23. 1151
      docs/faq.html
  24. 875
      docs/gettingstarted.html
  25. 999
      docs/howtoembed.html
  26. 356
      docs/images/process_begin.svg
  27. 987
      docs/index.html
  28. 733
      docs/license.html
  29. 809
      docs/lsbegin.html
  30. 919
      docs/menu.html
  31. 837
      docs/menuize.html
  32. 2
      docs/search/search_index.json
  33. 50
      docs/sitemap.xml
  34. BIN
      docs/sitemap.xml.gz
  35. 837
      docs/wojson.html
  36. 9
      examples/Elements/Elements.ino
  37. 5
      examples/mqttRSSI/mqttRSSI.ino
  38. 5
      examples/mqttRSSI_FS/data/mqtt_setting.json
  39. 2
      examples/mqttRSSI_NA/mqttRSSI_NA.ino
  40. 2
      library.json
  41. 2
      library.properties
  42. 135
      mkdocs/acelements.md
  43. 55
      mkdocs/achandling.md
  44. 59
      mkdocs/advancedusage.md
  45. 7
      mkdocs/apiaux.md
  46. 34
      mkdocs/apiconfig.md
  47. 212
      mkdocs/apielements.md
  48. 8
      mkdocs/changelog.md
  49. 356
      mkdocs/images/process_begin.svg
  50. 23
      src/AutoConnect.cpp
  51. 18
      src/AutoConnect.h
  52. 70
      src/AutoConnectAux.cpp
  53. 2
      src/AutoConnectAux.h
  54. 17
      src/AutoConnectAuxImpl.h
  55. 30
      src/AutoConnectDefs.h
  56. 3
      src/AutoConnectElement.h
  57. 86
      src/AutoConnectElementBasis.h
  58. 56
      src/AutoConnectElementBasisImpl.h
  59. 80
      src/AutoConnectElementJson.h
  60. 90
      src/AutoConnectElementJsonImpl.h
  61. 21
      src/AutoConnectPage.cpp
  62. 56
      src/AutoConnectTicker.cpp
  63. 53
      src/AutoConnectTicker.h

@ -96,8 +96,17 @@ Full documentation is available on https://Hieromon.github.io/AutoConnect, some
## Change log
### [0.9.11] July 13, 2019
- Supports new element as AutoConnectSytle that can insert the custom CSS into AutoConnectAux page. (PR#96)
- Supports that `<br>` tags can now be added to each element. (PR #95)
- Supports that able to place the checkbox label forward or backward. (PR #99)
- Supports flicker signal output according to the status of WiFi_mode. (issue #98)
- Supports AutoConnectAux::fetchElement function to retrieve inputted element values via a custom Web page.
- Fixed bug in AutoConnectCredential when offset is >256. (PR #103)
### [0.9.10] June 12, 2019
- Fixed the unable to get AutoConnectElemets values in the sketch with ESP8266 arduino core 2.5.2. (issue #90)
- Fixed missing psram allocator. (issue #102)
### [0.9.9] May 25, 2019
- Supports ESP8266 Arduino core 2.5.2.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -9,9 +9,9 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="99.565193mm"
height="272.12399mm"
viewBox="0 0 99.565193 272.12399"
width="99.56517mm"
height="304.07242mm"
viewBox="0 0 99.56517 304.07241"
version="1.1"
id="svg8776"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
@ -233,12 +233,12 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4142136"
inkscape:cx="350.72493"
inkscape:cy="591.29489"
inkscape:cx="192.80115"
inkscape:cy="364.94967"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-global="true"
showgrid="false"
inkscape:snap-global="false"
inkscape:snap-bbox="true"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
@ -261,8 +261,8 @@
<inkscape:grid
type="xygrid"
id="grid9104"
originx="-23.598344"
originy="-16.404155" />
originx="-23.598368"
originy="15.544285" />
</sodipodi:namedview>
<metadata
id="metadata8773">
@ -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>
@ -280,40 +280,15 @@
inkscape:label="レイヤー 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-23.598344,-8.4718652)">
transform="translate(-23.598368,-8.4718652)">
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,32.416658 v 3.96875"
d="m 58.208334,32.416659 v 4.08568"
id="path9639-1"
inkscape:connector-curvature="0" />
<g
id="g9322"
transform="translate(-25.135403,-130.96875)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="189.47736"
x="277.58359"
height="18.355465"
width="18.355474"
id="rect9184-6-3-4"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188"
y="158.61438"
x="70.845284"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190"
style="line-height:1em;fill:#d40055;fill-opacity:1;stroke-width:0.26458332"
y="158.61438"
x="70.845284"
sodipodi:role="line">immediateStart</tspan></text>
</g>
<g
id="g9353"
transform="translate(-15.875002,-80.697917)">
transform="translate(-15.875002,-48.749459)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -338,7 +313,7 @@
</g>
<g
id="g10108"
transform="translate(-42.333331,-3.1749998)">
transform="translate(-42.333331,28.77345)">
<rect
transform="matrix(0.945946,0.32432418,-0.945946,0.32432418,0,0)"
ry="3.6888673e-006"
@ -363,7 +338,7 @@
</g>
<g
id="g9385"
transform="translate(-1.3229192,-84.66667)">
transform="translate(-1.3229192,-52.718212)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -386,7 +361,8 @@
sodipodi:role="line">WiFi.scanNetworks</tspan></text>
</g>
<g
id="g1026">
id="g1026"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -414,7 +390,8 @@
sodipodi:role="line">matched credential</tspan></text>
</g>
<g
id="g1014">
id="g1014"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -438,7 +415,7 @@
</g>
<g
id="g9353-2"
transform="translate(-15.875002,-13.229167)">
transform="translate(-15.875002,18.719279)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -463,7 +440,7 @@
</g>
<g
id="g9622"
transform="translate(-68.285876,18.615978)">
transform="translate(-68.285876,50.564436)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -516,7 +493,7 @@
inkscape:connector-curvature="0" />
<g
id="g9714"
transform="translate(-78.07551,4.0638529)">
transform="translate(-78.07551,36.012307)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -538,33 +515,29 @@
id="tspan9136-4-0-9-8"
sodipodi:role="line">WiFi.softAP</tspan></text>
</g>
<g
id="g9746"
transform="translate(-19.843798,-39.555244)">
<rect
ry="0.26458257"
rx="0.26458332"
y="175.2917"
x="108.47922"
height="7.9375019"
width="34.395828"
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"
id="rect9134-4-7-4-6-0"
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" />
width="34.395828"
height="7.9375019"
x="88.635422"
y="167.68488"
rx="0.26458332"
ry="0.26458257" />
<text
id="text9138-7-3-9-0-6"
y="180.44255"
x="110.44085"
xml:space="preserve"
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="180.44255"
x="110.44085"
x="90.597054"
y="172.83572"
id="text9138-7-3-9-0-6"><tspan
sodipodi:role="line"
id="tspan9136-4-0-9-8-9"
sodipodi:role="line">START Web Server</tspan></text>
</g>
x="90.597054"
y="172.83572"
style="stroke-width:0.26458332">START Web Server</tspan></text>
<g
id="g9778"
transform="translate(-43.656245,-1.1906199)">
transform="translate(-43.656245,30.757831)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -588,7 +561,7 @@
</g>
<g
id="g9746-3"
transform="translate(-67.492182,-15.779896)">
transform="translate(-67.492182,16.16855)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -612,7 +585,7 @@
</g>
<g
id="g9834"
transform="translate(-79.374976,-2.3812481)">
transform="translate(-79.374976,29.567202)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -636,7 +609,8 @@
sodipodi:role="line">portalTimeout</tspan></text>
</g>
<g
id="g1006">
id="g1006"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -666,16 +640,16 @@
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" />
style="opacity:0.66000001;fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<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" />
style="opacity:0.66000001;fill:none;stroke:#000000;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g9353-2-8"
transform="translate(-15.875002,88.900003)">
transform="translate(-15.875002,120.84858)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -699,7 +673,8 @@
sodipodi:role="line">CONNECTED</tspan></text>
</g>
<g
id="g11043">
id="g11043"
transform="translate(0,31.948452)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -724,7 +699,7 @@
</g>
<g
id="g9980"
transform="translate(-9.2604205,-8.8635315)">
transform="translate(-9.2604205,23.084915)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -748,7 +723,7 @@
</g>
<g
id="g10054"
transform="translate(-1.3229224,65.748961)">
transform="translate(-1.3229224,97.697415)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -777,12 +752,12 @@
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,44.322908 v 3.96875"
d="m 58.208333,76.271366 v 3.96875"
id="path9639-1-3"
inkscape:connector-curvature="0" />
<g
id="g9659"
transform="translate(-34.395836,1.3229159)">
transform="translate(-34.395836,33.271369)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -806,138 +781,138 @@
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 105.83333,143.8064 V 265.60094 H 92.604167"
d="M 105.83333,175.75504 V 297.54958 H 92.604167"
id="path9639-1-3-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458329px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 75.563113,54.244669 30.107867,-0.06083 0.0306,81.420331"
d="m 75.563113,86.193127 30.107867,-0.06083 0.0306,81.420513"
id="path10088"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,60.197908 v 3.96875"
d="m 58.208333,92.146366 v 3.96875"
id="path9639-1-3-1"
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 58.208333,76.072908 v 3.96875"
d="m 58.208333,108.02141 v 3.96877"
id="path9639-1-3-1-7"
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 58.208333,87.979158 v 3.96875"
d="m 58.208333,119.92773 v 3.96877"
id="path9639-1-3-1-7-9"
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 58.208333,99.885408 v 3.968752"
d="m 58.208333,131.83404 v 3.96876"
id="path9639-1-3-1-7-9-4"
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 58.208333,111.79166 v 3.96875"
d="m 58.208333,143.7403 v 3.96875"
id="path9639-1-3-1-7-9-4-4"
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 58.208333,127.66666 v 3.96875"
d="m 58.208333,159.6153 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8"
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 58.184947,143.63681 v 3.96875"
d="m 58.184947,175.58545 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3"
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 58.184947,155.54306 v 3.96875"
d="m 58.184947,187.4917 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9"
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 58.208333,131.63541 v 3.96875"
d="m 58.208333,163.58405 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-5"
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 40.845696,26.549382 -17.114957,-0.09412 0.08176,105.180148 h 34.395832"
style="fill:none;stroke:#000000;stroke-width:0.26458329px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 40.845696,26.589892 23.730739,26.467079 23.812499,163.71219 H 58.208331"
id="path10088-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10923)"
d="m 24.291915,70.119854 h 16.45392"
d="m 24.291915,102.06832 h 16.45392"
id="path10088-92"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,167.48646 v 3.96875"
d="m 58.208333,199.4351 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5"
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 58.208333,179.52499 v 3.96875"
d="m 58.208333,211.47363 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1"
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 58.208333,199.36877 v 3.96875"
d="m 58.208333,231.31741 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-3"
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 58.208333,213.92085 v 3.96875"
d="m 58.208333,245.86949 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-3-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
d="m 57.679167,183.22916 -33.866667,0.13255 0.0073,40.48128 h 16.92604"
d="m 57.679167,215.1778 -33.866667,0.13255 0.0073,40.48128 h 16.92604"
id="path10088-92-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,183.49374 v 3.96875"
d="m 58.208333,215.44238 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9"
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 58.208333,229.79582 v 3.96875"
d="m 58.208333,261.74446 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8"
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 58.208333,233.76457 v 3.96875"
d="m 58.208333,265.71321 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10931)"
d="m 58.7375,234.02852 33.866674,-0.13255 -0.0073,-40.48128 H 75.670833"
d="m 58.7375,265.97716 33.866674,-0.13255 -0.0073,-40.48128 H 75.670833"
id="path10088-92-6-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,261.81041 v 3.96875"
d="m 58.208333,293.75905 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8-5"
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 58.208333,249.63957 v 3.96875"
d="m 58.208333,281.58821 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-5-8"
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 58.208333,265.77916 v 3.96875"
d="m 58.208333,297.7278 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8-5-4"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10937)"
d="m 58.7375,265.6464 33.734352,-0.0718 -0.007,-21.90474 H 75.538509"
d="m 58.7375,297.59504 33.734352,-0.0718 -0.007,-21.90474 H 75.538509"
id="path10088-92-6-8-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
@ -967,49 +942,49 @@
xml:space="preserve"
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"
x="35.860859"
y="69.289612"
y="101.23806"
id="text10760-5-4"><tspan
sodipodi:role="line"
id="tspan10758-9-7"
x="35.860859"
y="69.289612"
y="101.23806"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="53.414608"
y="85.363075"
id="text10760-1"><tspan
sodipodi:role="line"
id="tspan10758-2"
x="76.719864"
y="53.414608"
y="85.363075"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="62.554363"
y="94.502831"
id="text10760-5-5"><tspan
sodipodi:role="line"
id="tspan10758-9-6"
x="60.544109"
y="62.554363"
y="94.502831"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="60.844864"
y="78.423164"
y="110.3716"
id="text10760-1-0"><tspan
sodipodi:role="line"
id="tspan10758-2-1"
x="60.844864"
y="78.423164"
y="110.3716"
style="stroke-width:0.26458332">YES</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 75.257782,121.71354 30.310608,0.13228"
d="m 75.257782,153.66218 30.310608,0.13228"
id="path10088-92-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -1017,89 +992,214 @@
xml:space="preserve"
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"
x="76.719864"
y="120.88336"
y="152.83147"
id="text10760-1-3"><tspan
sodipodi:role="line"
id="tspan10758-2-13"
x="76.719864"
y="120.88336"
y="152.83147"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="130.02312"
y="161.97112"
id="text10760-5-5-6"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0"
x="60.544109"
y="130.02312"
y="161.97112"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="201.46062"
y="233.40862"
id="text10760-5-5-6-4"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0"
x="60.544109"
y="201.46062"
y="233.40862"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="192.32086"
y="224.26886"
id="text10760-1-3-5"><tspan
sodipodi:role="line"
id="tspan10758-2-13-1"
x="76.719864"
y="192.32086"
y="224.26886"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.844864"
y="231.8815"
y="263.82974"
id="text10760-1-3-7"><tspan
sodipodi:role="line"
id="tspan10758-2-13-5"
x="60.844864"
y="231.8815"
y="263.82974"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="35.860859"
y="222.74794"
y="254.69594"
id="text10760-5-5-6-4-8"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0-2"
x="35.860859"
y="222.74794"
y="254.69594"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="242.46483"
y="274.41339"
id="text10760-1-3-7-8"><tspan
sodipodi:role="line"
id="tspan10758-2-13-5-2"
x="76.719864"
y="242.46483"
y="274.41339"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="251.73145"
y="283.68027"
id="text10760-5-5-6-4-8-0"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0-2-9"
x="60.544109"
y="251.73145"
y="283.68027"
style="stroke-width:0.26458332">NO</tspan></text>
<g
id="g2540"
transform="translate(0.132299)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="25.565748"
x="86.960411"
height="18.355465"
width="18.355474"
id="rect9184-6-3-8-7"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777273;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188-0-35"
y="43.602272"
x="45.906498"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190-3-0"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;line-height:1em;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;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332"
y="43.602272"
x="45.906498"
sodipodi:role="line">SSID &amp; Password</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208331,48.448734 v 3.968749"
id="path9639-1-1"
inkscape:connector-curvature="0" />
<g
id="g9322"
transform="translate(-25.135403,-130.96875)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="189.47736"
x="277.58359"
height="18.355465"
width="18.355474"
id="rect9184-6-3-4"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188"
y="158.61438"
x="70.845284"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190"
style="line-height:1em;fill:#d40055;fill-opacity:1;stroke-width:0.26458332"
y="158.61438"
x="70.845284"
sodipodi:role="line">immediateStart</tspan></text>
</g>
<g
id="g2636">
<g
transform="translate(0,-3.1750001)"
id="g2615">
<rect
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"
id="rect9134-4-7-4-8"
width="34.395828"
height="7.9375019"
x="41.010422"
y="55.700027"
rx="0.26458332"
ry="0.26458257" />
<text
xml:space="preserve"
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"
x="44.447163"
y="60.54702"
id="text9138-7-3-9-8"><tspan
sodipodi:role="line"
id="tspan9136-4-0-9-4"
x="44.447163"
y="60.54702"
style="stroke-width:0.26458332">WiFi.disconnect()</tspan></text>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 58.208331,60.594821 V 64.56357"
id="path9639-1-1-3"
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 41.085466,42.413935 -10.12458,-0.0196 0.01766,22.036862 h 27.103849"
id="path10088-9-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 58.208331,64.232821 V 68.20157"
id="path9639-1-1-3-1"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
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"
x="26.330828"
y="37.121212"
id="text10760-5-9"><tspan
sodipodi:role="line"
id="tspan10758-9-8"
x="26.330828"
y="37.121212"
style="stroke-width:0.26458332">Not</tspan><tspan
sodipodi:role="line"
x="26.330828"
y="41.089962"
style="stroke-width:0.26458332"
id="tspan2758">presented</tspan></text>
<text
xml:space="preserve"
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"
x="60.844868"
y="50.651817"
id="text10760-2"><tspan
sodipodi:role="line"
id="tspan10758-99"
x="60.844868"
y="50.651817"
style="stroke-width:0.26458332">Specified</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2,127 +2,127 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://Hieromon.github.io/AutoConnect/index.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/gettingstarted.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/menu.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/basicusage.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/advancedusage.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acintro.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acelements.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acjson.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/achandling.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/api.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiaux.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiconfig.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apielements.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiextra.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/howtoembed.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/datatips.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/menuize.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/wojson.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/lsbegin.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/credit.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acupload.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/colorized.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/faq.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/changelog.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/license.html</loc>
<lastmod>2019-06-12</lastmod>
<lastmod>2019-07-17</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -42,6 +42,7 @@ static const char PAGE_ELEMENTS[] PROGMEM = R"(
"type": "ACCheckbox",
"value": "check",
"label": "Check",
"labelposition": "infront",
"checked": true
},
{
@ -74,11 +75,6 @@ static const char PAGE_ELEMENTS[] PROGMEM = R"(
"label": "Select",
"selected": 2
},
{
"name": "element",
"type": "ACElement",
"value": "<br>"
},
{
"name": "load",
"type": "ACSubmit",
@ -134,6 +130,7 @@ static const char PAGE_SAVE[] PROGMEM = R"(
WebServerClass server;
AutoConnect portal(server);
AutoConnectConfig config;
AutoConnectAux elementsAux;
AutoConnectAux saveAux;
@ -202,6 +199,8 @@ void setup() {
});
portal.join({ elementsAux, saveAux });
config.ticker = true;
portal.config(config);
portal.begin();
}

@ -44,6 +44,11 @@ static const char AUX_mqtt_setting[] PROGMEM = R"raw(
"uri": "/mqtt_setting",
"menu": true,
"element": [
{
"name": "style",
"type": "ACStyle",
"value": "label+input,label+select{position:sticky;left:120px;width:230px!important;box-sizing:border-box;}"
},
{
"name": "header",
"type": "ACText",

@ -3,6 +3,11 @@
"uri": "/mqtt_setting",
"menu": true,
"element": [
{
"name": "style",
"type": "ACStyle",
"value": "label+input,label+select{position:sticky;left:120px;width:230px!important;box-sizing:border-box;}"
},
{
"name": "header",
"type": "ACText",

@ -46,6 +46,7 @@ typedef WebServer WiFiWebServer;
// facility.
// Declare AutoConnectElements for the page asf /mqtt_setting
ACStyle(style, "label+input,label+select{position:sticky;left:120px;width:230px!important;box-sizing:border-box;}");
ACText(header, "<h2>MQTT broker settings</h2>", "text-align:center;color:#2f4f4f;padding:10px;");
ACText(caption, "Publishing the WiFi signal strength to MQTT channel. RSSI value of ESP8266 to the channel created on ThingSpeak", "font-family:serif;color:#4682b4;");
ACInput(mqttserver, "", "Server", "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$", "MQTT broker server");
@ -60,6 +61,7 @@ ACSubmit(discard, "Discard", "/");
// Declare the custom Web page as /mqtt_setting and contains the AutoConnectElements
AutoConnectAux mqtt_setting(AUX_SETTING_URI, "MQTT Setting", true, {
style,
header,
caption,
mqttserver,

@ -25,6 +25,6 @@
"espressif8266",
"espressif32"
],
"version": "0.9.10",
"version": "0.9.11",
"license": "MIT"
}

@ -1,5 +1,5 @@
name=AutoConnect
version=0.9.10
version=0.9.11
author=Hieromon Ikasamo <hieromon@gmail.com>
maintainer=Hieromon Ikasamo <hieromon@gmail.com>
sentence=ESP8266/ESP32 WLAN configuration at runtime with web interface.

@ -9,12 +9,18 @@ Representative HTML elements for making the custom Web page are provided as Auto
- [AutoConnectInput](#autoconnectinput): Labeled text input box
- [AutoConnectRadio](#autoconnectradio): Labeled radio button
- [AutoConnectSelect](#autoconnectselect): Selection list
- [AutoConnectStyle](#autoconnectstyle): Custom CSS code
- [AutoConnectSubmit](#autoconnectsubmit): Submit button
- [AutoConnectText](#autoconnecttext): Style attributed text
## Layout on a custom Web page
The elements of the page created by AutoConnectElements are aligned vertically exclude the [AutoConnectRadio](#autoconnectradio). You can specify the direction to arrange the radio buttons as AutoConnectRadio vertically or horizontally. This basic layout depends on the CSS of the AutoConnect menu so you can not change drastically.
AutoConnect will not actively be involved in the layout of custom Web pages generated from AutoConnectElements. However, each element has [an attribute to arrange placement](#post) on a custom web page by horizontally or vertically.
## Custom CSS for a custom Web page
All custom Web page styles are limited to the built-in unique CSS embedded in the library code. Direct modification of the CSS affects AutoConnect behavior. You can use dedicated elements to relatively safely modify the style of your custom Web page.
The [AutoConnectStyle](#autoconnectstyle) will insert the raw CSS code into the style block in HTML of the custom Web page.
## Form and AutoConnectElements
@ -32,7 +38,7 @@ AutoConnectElement is a base class for other element classes and has common attr
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectElement(const char* name, const char* value)
AutoConnectElement(const char* name, const char* value, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -43,6 +49,29 @@ Each element has a name. The **name** is the String data type. You can identify
The **value** is the string which is a source to generate an HTML code. Characteristics of Value vary depending on the element. The value of AutoConnectElement is native HTML code. A string of value is output as HTML as it is.
### <i class="fa fa-caret-right"></i> post
The **post** specifies a tag to add behind the HTML code generated from the element. Its purpose is to place elements on the custom Web page as intended by the user sketch.
AutoConnect will not actively be involved in the layout of custom Web pages generated from AutoConnectElements. Each element follows behind the previous one, with the exception of some elements. You can use the **post** value to arrange vertically or horizontal when the elements do not have the intended position on the custom Web Page specifying the following enumeration value as **ACPosterior_t** type for the **post**.
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
The default interpretation of the post value is specific to each element.
AutoConnectElements | Default interpretation of the post value
----|----
AutoConnectElement | AC_Tag_None
AutoConnectButton | AC_Tag_None
AutoConnectCheckBox | AC_Tag_BR
AutoConnectFile | AC_Tag_BR
AutoConnectInput | AC_Tag_BR
AutoConnectRadio | AC_Tag_BR
AutoConnectSelect | AC_Tag_BR
AutoConnectSubmit | AC_Tag_None
AutoConnectText | AC_Tag_None
### <i class="fa fa-caret-right"></i> type
The **type** indicates the type of the element and represented as the *ACElement_t* enumeration type in the sketch. Since AutoConnectElement also acts as a variant of other elements, it can be applied to handle elements collectively. At that time, the type can be referred to by the [**typeOf()**](apielements.md#typeof) function. The following example changes the font color of all [AutoConnectText](#autoconnecttext) elements of a custom Web page to gray.
@ -68,6 +97,7 @@ The enumerators for *ACElement_t* are as follows:
- AutoConnectInput: **AC_Input**
- AutoConnectRadio: **AC_Radio**
- AutoConnectSelect: **AC_Select**
- AutoConnectStyle: **AC_Style**
- AutoConnectSubmit: **AC_Submit**
- AutoConnectText: **AC_Text**
- Uninitialized element: **AC_Unknown**
@ -100,7 +130,7 @@ AutoConnectButton generates an HTML `#!html <button type="button">` tag and loca
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectButton(const char* name, const char* value, const String& action)
AutoConnectButton(const char* name, const char* value, const String& action, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -131,6 +161,10 @@ ACButton(Button, "COPY", "CopyText()");
ACElement(TextCopy, scCopyText);
```
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_None`.
## AutoConnectCheckbox
AutoConnectCheckbox generates an HTML `#!html <input type="checkbox">` tag and a `#!html <label>` tag. It places horizontally on a custom Web page by default.
@ -143,7 +177,7 @@ AutoConnectCheckbox generates an HTML `#!html <input type="checkbox">` tag and a
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectCheckbox(const char* name, const char* value, const char* label, const bool checked)
AutoConnectCheckbox(const char* name, const char* value, const char* label, const bool checked, const ACPosition_t labelPosition, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -163,9 +197,20 @@ Only <i class="far fa-square"></i> will be displayed if a label is not specified
A checked is a Boolean value and indicates the checked status of the checkbox. The value of the checked checkbox element is packed in the query string and sent.
### <i class="fa fa-caret-right"></i> labelPosition
The position of the label belonging to the checkbox can be specified around the element. The labelPosition specifies the position of the label to generate with **ACPostion_t** enumeration value. The default value is `AC_Behind`.
- **`AC_Infront`** : Place a label in front of the check box.
- **`AC_Behind`** : Place a label behind the check box.
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_BR`.
## AutoConnectFile
AutoConnectFile generates asn HTML `#!html <input type="file">` tag and a `#!html <label>` tag. AutoConnectFile enables file upload from the client through the web browser to ESP8266/ESP32 module. You can select the flash in the module, external SD device or any output destination as the storage of the uploaded file.
AutoConnectFile generates an HTML `#!html <input type="file">` tag and a `#!html <label>` tag. AutoConnectFile enables file upload from the client through the web browser to ESP8266/ESP32 module. You can select the flash in the module, external SD device or any output destination as the storage of the uploaded file.
<i class="fa fa-eye"></i> **Sample**<br>
<small>**`AutoConnectFile file("file", "", "Upload:", AC_File_FS)`**</small>
@ -175,7 +220,7 @@ AutoConnectFile generates asn HTML `#!html <input type="file">` tag and a `#!htm
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectFile(const char* name, const char* value, const char* label, const ACFile_t store)
AutoConnectFile(const char* name, const char* value, const char* label, const ACFile_t store, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -201,6 +246,10 @@ Specifies the destination to save the uploaded file. The destination can be spec
!!! note "Built-in uploader is ready."
AutoConnect already equips the built-in uploader for saving to the SPIFFS as AC_File_FS and the external SD as AC_File_SD. It is already implemented inside AutoConnect and will store uploaded file automatically.
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_BR`.
## AutoConnectInput
AutoConnectInput generates an HTML `#!html <input type="text">` tag and a `#!html <label>` tag. It can also have a placeholder. The value of the input box is passed to the destination in the query string and can be retrieved programmatically. You can also update from the sketches.
@ -213,7 +262,7 @@ AutoConnectInput generates an HTML `#!html <input type="text">` tag and a `#!htm
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectInput(const char* name, const char* value, const char* label, const char* pattern, const char* placeholder)
AutoConnectInput(const char* name, const char* value, const char* label, const char* pattern, const char* placeholder, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -247,6 +296,10 @@ A `pattern` specifies a [regular expression](https://www.w3schools.com/js/js_reg
A placeholder is an option string. Specification of a placeholder will generate a `placeholder` attribute for the input tag.
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_BR`.
## AutoConnectRadio
AutoConnectRadio generates few HTML `#!html <input type="radio">` tags as grouped and the same number of `#!html <label>` tags. AutoConnectRadio can keep the value of a radio button as a collection. The grouped values will be placed in the custom Web page to select only one exclusively.
@ -259,7 +312,7 @@ AutoConnectRadio generates few HTML `#!html <input type="radio">` tags as groupe
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectRadio(const char* name, std::vector<String> const& values, const char* label, const ACArrange_t order, const uint8_t checked)
AutoConnectRadio(const char* name, std::vector<String> const& values, const char* label, const ACArrange_t order, const uint8_t checked, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -287,6 +340,32 @@ A label will place in the left or the top according to the **order**.
A `checked` specifies the index number (1-based) of the **values** to be checked. If this parameter is not specified neither item is checked.
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_BR`.
## AutoConnectStyle
AutoConnectStyle inserts the string given by the **value** into the style block of a custom Web page as it is raw.
!!! warning "The validity as CSS will not be checked"
AutoConnectStyle does not do syntax checking and semantic analysis of value. Insert the specified string into the style block of the custom Web page without processing it.
Therefore, specifying the wrong CSS will modulate the behavior of the custom Web page.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectStyle(const char* name, const char* value)
```
### <i class="fa fa-caret-right"></i> name
It is the `name` of the AutoConnectStyle element and is useful only to access this element from the sketch. It does not affect the generated HTML code.
### <i class="fa fa-caret-right"></i> value
The raw CSS code. It is not necessary to write `<style>` `</style>` tags.
## AutoConnectSelect
AutoConnectSelect generates an HTML `#!html <select>` tag (drop-down list) and few `#!html <option>` tags.
@ -299,7 +378,7 @@ AutoConnectSelect generates an HTML `#!html <select>` tag (drop-down list) and f
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectSelect(const char* name, std::vector<String> const& options, const char* label, const uint8_t selected)
AutoConnectSelect(const char* name, std::vector<String> const& options, const char* label, const uint8_t selected, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -318,6 +397,10 @@ A `label` is an optional string. A label is always arranged on the left side of
A `selected` is an optional value. Specifies that an option should be pre-selected when the page loads.
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_BR`.
## AutoConnectSubmit
AutoConnectSubmit generates an HTML `#!html <input type="button">` tag attached `#!html onclick` attribute. The native code of the `#!html onclick` attribute is the submission of the form with the **POST** method.
@ -330,7 +413,7 @@ AutoConnectSubmit generates an HTML `#!html <input type="button">` tag attached
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectSubmit(const char* name, const char* value, const char* uri)
AutoConnectSubmit(const char* name, const char* value, const char* uri, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -349,6 +432,10 @@ The query string of the form data sent with AutoConnectSubmit contains the URI o
\_acuri=**CALLER_URI**
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_None`.
## AutoConnectText
AutoConnectText generates an HTML `#!html <div>` tag. A `#!html style` attribute will be attached if a [style](#style) parameter is passed.
@ -361,7 +448,7 @@ AutoConnectText generates an HTML `#!html <div>` tag. A `#!html style` attribute
### <i class="fa fa-edit"></i> Constructor
```cpp
AutoConnectText(const char* name, const char* value, const char* style, const char* format)
AutoConnectText(const char* name, const char* value, const char* style, const char* format, const ACPosterior_t post)
```
### <i class="fa fa-caret-right"></i> name
@ -378,7 +465,11 @@ A `style` specifies the qualification style to give to the content and can use t
### <i class="fa fa-caret-right"></i> format
A `format` is a pointer to a null-terminated multibyte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions, but depends on the espressif sdk implementation. The conversion specification is valid only in **%s** format. (Left and Right justification, width are also valid.)
A `format` is a pointer to a null-terminated multi byte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions, but depends on the Espressif's SDK implementation. The conversion specification is valid only in **%s** format. (Left and Right justification, width are also valid.)
### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_None`.
## How to coding for the elements
@ -388,23 +479,25 @@ Variables of each AutoConnetElement can be declared with macros. By using the ma
[^2]: The square brackets in the syntax are optional parameters, the stroke is a selection parameter, the bold fonts are literal.
ACElement ( *name* <small>\[</small> , *value* <small>\]</small> )
ACElement ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACButton ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *action* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACButton ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *action* <small>\]</small> )
ACCheckbox ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , <small>**true**</small> | <small>**false**</small> <small>\]</small> <small>\[</small> , <small>**AC_Infront**</small> | <small>**AC_Behind**</small> <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACCheckbox ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , **true** | **false** <small>\]</small> )
ACFile ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , <small>**AC\_File\_FS**</small> | <small>**AC\_File\_SD**</small> | <small>**AC\_File\_Extern**</small> <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACFile ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , **AC\_File\_FS** | **AC\_File\_SD** | **AC\_File\_Extern** <small>\]</small> )
ACInput ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , *pattern* <small>\]</small> <small>\[</small> , *placeholder* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACInput ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , *pattern* <small>\]</small> <small>\[</small> , *placeholder* <small>\]</small> )
ACRadio ( *name* <small>\[</small> , *values* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , <small>**AC\_Horizontal</small>** | <small>**AC\_Vertical**</small> <small>\]</small> <small>\[</small> , *checked* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACRadio ( *name* <small>\[</small> , *values* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , **AC\_Horizontal** | **AC\_Vertical** <small>\]</small> <small>\[</small> , *checked* <small>\]</small> )
ACSelect ( *name* <small>\[</small> , *options* <small>\]</small> <small>\[</small> , *label* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACSelect ( *name* <small>\[</small> , *options* <small>\]</small> <small>\[</small> , *label* <small>\]</small> )
ACStyle ( *name* <small>\[</small> , *value* <small>\]</small> )
ACSubmit ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *uri* <small>\]</small> )
ACSubmit ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *uri* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
ACText ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *style* <small>\]</small> <small>\[</small> , *format* <small>\]</small> )
ACText ( *name* <small>\[</small> , *value* <small>\]</small> <small>\[</small> , *style* <small>\]</small> <small>\[</small> , *format* <small>\]</small> <small>\[</small> , <small>**AC\_Tag\_None**</small> | <small>**AC\_Tag\_BR**</small> | <small>**AC\_Tag\_P**</small> <small>\]</small> )
!!! memo "Declaration macro usage"
For example, *AutoConnectText* can be declared using macros.

@ -595,6 +595,61 @@ portal.on("/echo", [](AutoConnectAux& aux, PageArgument& args) {
portal.begin();
```
### <i class="fa fa-wrench"></i> Retrieve the values with WebServer::on handler
ESP8266WebServer class and the WebServer (for ESP32) class assume that the implementation of the ReqestHandler class contained in the WebServer library will handle the URL requests. Usually, it is sketch code registered by ESP8266WebServer::on (or WebServer::on for ESP32) function.
When the page transitions from the custom Web page created by AutoConnectAux to the handler registered by ESP2866WebServer::on function, a little trick is needed to retrieve the values of AutoConnectElements. (i.e. the URI of the ESP8266WebServer::on handler is specified in the [uri](acelements.md#uri) attribute of [AutoConnectSubmit](acelements.md#autoconnectsubmit)) AutoConnect cannot intervene in the procedure in which the ESP8266WebServer class calls the on-page handler by the sketch. Therefore, it is necessary to retrieve preliminary the values of AutoConnectElements using the [**AutoConnectAux::fetchElement**](apiaux.md#fetchelement) function for value processing with the on-page handler.
The following sketch is an example of extracting values inputted on a custom web page with an on-page handler and then processing it.
```cpp hl_lines="13 20 27 38"
ESP8266WebServer server;
AutoConnect portal(server);
AutoConnectAux Input;
const static char InputPage[] PROGMEM = R"r(
{
"title": "Input", "uri": "/input", "menu": true, "element": [
{ "name": "input", "type": "ACInput", "label": "INPUT" },
{
"name": "save",
"type": "ACSubmit",
"value": "SAVE",
"uri": "/"
}
]
}
)r";
// An on-page handler for '/' access
void onRoot() {
String content =
"<html>"
"<head><meta name='viewport' content='width=device-width, initial-scale=1'></head>"
"<body><div>INPUT: {{value}}</div></body>"
"</html>";
Input.fetchElement(); // Preliminary acquisition
// For this steps to work, need to call fetchElement function beforehand.
String value = Input["input"].value;
content.replace("{{value}}", value);
server.send(200, "text/html", content);
}
void setup() {
Input.load(InputPage);
portal.join(Input);
server.on("/", onRoot); // Register the on-page handler
portal.begin();
}
void loop() {
portal.handleClient();
}
```
### <i class="fa fa-wpforms"></i> Overwrite the AutoConnectElements
Sketches can update the attributes of AutoConnectElements with two approaches. A one is to assign directly to the attributes of a member variable of its element. The other is to overwrite them with loading the element by [AutoConnectAux::loadElement](apiaux.md#loadelement).

@ -412,6 +412,7 @@ AutoConnect will activate SoftAP at failed the first *WiFi.begin*. It SoftAP set
- Auto reset after connection establishment.
- Home URL of the user sketch application.
- Menu title.
- Ticker signal output.
!!! note "AutoConnect::config before AutoConnect::begin"
*AutoConnect::config* must be executed before *AutoConnect::begin*.
@ -450,6 +451,9 @@ void setup() {
}
```
You can also assign no password to SoftAP launched as a captive portal. Assigning a null string as `String("")` to [AutoConnectConfig::psk](apiconfig.md#psk) does not require a password when connecting to SoftAP.
But this method is not recommended. The broadcast radio of SSID emitted from SoftAP will leak and reach several tens of meters.
### <i class="fa fa-caret-right"></i> Relocate the AutoConnect home path
A home path of AutoConnect is **/\_ac** by default. You can access from the browser with http://IPADDRESS/\_ac. You can change the home path by revising [**AUTOCONNECT_URI**](https://github.com/Hieromon/AutoConnect/blob/master/src/AutoConnectDefs.h#L62) macro in the include header file as [AutoConnectDef.h](https://github.com/Hieromon/AutoConnect/blob/master/src/AutoConnectDef.h).
@ -492,3 +496,58 @@ portal.begin();
- Up to 24 characters
- Only the alphabet (a-z, A-Z), digits (0-9), minus sign (-)
- No '-' as last character
### <i class="fa fa-caret-right"></i> Ticker for WiFi status
Flicker signal can be output from the ESP8266/ESP32 module according to WiFi connection status. If you connect the LED to the signal output pin, you can know the WiFi connection status during behavior inside AutoConnect::begin through the LED blink.
[AutoConnectConfig::ticker](apiconfig.md#ticker) option specifies flicker signal output. The following sketch is an example of flashing the active-high LED connected to pin #16 according to WiFi connection during the AutoConnect::begin.
```cpp
AutoConnect portal;
AutoConnectConfig Config;
Config.ticker = true;
config.tickerPort = 16;
Config.tickerOn = HIGH;
portal.config(Config);
portal.begin();
```
The AutoConnect ticker indicates the WiFi connection status in the following three flicker patterns:
- Short blink: The ESP8266/ESP32 module stays in APSTA mode.
- Short-on and long-off: No STA connection state. (i.e. WiFi.status != WL_CONNECTED)
- No blink: WiFi connection with access point established and data link enabled. (i.e. WiFi.status = WL_CONNECTED)
The flicker cycle length is defined by some macros in `AutoConnectDefs.h` header file.
```cpp
#define AUTOCONNECT_FLICKER_PERIODAP 1000 // [ms]
#define AUTOCONNECT_FLICKER_PERIODDC (AUTOCONNECT_FLICKER_PERIODAP << 1) // [ms]
#define AUTOCONNECT_FLICKER_WIDTHAP 96 // (8 bit resolution)
#define AUTOCONNECT_FLICKER_WIDTHDC 16 // (8 bit resolution)
```
- `AUTOCONNECTT_FLICKER_PERIODAP`:
Assigns a flicker period when the ESP8266/ESP32 module stays in APSTA mode.
- `AUTOCONNECT_FLICKER_PERIODDC`:
Assigns a flicker period when WiFi is disconnected.
- `AUTOCONNECT_FLICKER_WIDTHAP` and `AUTOCONNECT_FLICKER_WIDTHDC`:
Specify the duty rate for each period[ms] in 8-bit resolution.
[AutoConnectConfig::tickerPort](apiconfig.md#tickerport) specifies a port that outputs the flicker signal. If you are using an LED-equipped ESP8266/ESP32 module board, you can assign a LED pin to the tick-port for the WiFi connection monitoring without the external LED. The default pin is arduino valiant's **LED\_BUILTIN**. You can refer to the Arduino IDE's variant information to find out which pin actually on the module assign to **LED\_BUILTIN**.[^3]
[^3]: It's defined in the `pins_arduino.h` file, located in the sub-folder named **variants** wherein Arduino IDE installed folder.
[AutoConnectConfig::tickerOn](apiconfig.md#tickeron) specifies the active logic level of the flicker signal. This value indicates the active signal level when driving the ticker. For example, if the LED connected to tickPort lights by LOW, the tickerOn is **LOW**. The logic level of LED_BUILTIN for popular modules are as follows:
module | Logic level | LED_BUILTIN Pin | Arduino alias
----|----|:---:|----
NodeMCU V1.0 | Active-low | 16 | D0
WEMOS D1 mini | Active-low | 2 | D4
SparkFun ESP8266 Thing | Active-high | 5 |
Adafruit Feather HUZZAH ESP8266 | Active-low | 0 |
NodeMCU 32s | Active-high | 2 | T2
LOLIN32 Pro | Active-low | 5 | SS
SparkFun ESP32 Thing | Active-high | 5
Adafruit Feather HUZZAH32 | Active-high | 13 | A12

@ -42,6 +42,13 @@ Add an element to the AutoConnectAux. An added element is displayed on the custo
<dd><span class="apidef">addons</span><span class="apidesc">An array list of reference of AutoConnectElements. The [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) with braced-init-list of the [std::vector](https://en.cppreference.com/w/cpp/container/vector) can be used for the addons parameter cause the actual definition of type **AutoConnectElementVT** is `std::vector<std::reference_wrapper<AutoConnectElement>>`.</span></dd>
</dl>
### <i class="fa fa-caret-right"></i> fetchElement
```cpp
void fetchElement(void)
```
Retrieve the values of the AutoConnectElements on the custom Web page. Refer to [how to use the fetchElement](achandling.md#retrieve-the-values-with-webserveron-handler).
### <i class="fa fa-caret-right"></i> getElement
```cpp

@ -98,7 +98,7 @@ Specify the location to be redirected after module reset in the AutoConnect menu
<dd>AC_ONBOOTURI_t</dd>
<dt>**Value**</dt>
<dd><span class="apidef">AC_ONBOOTURI_ROOT</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Resetting the module redirects it to the AutoConnect root path. The root path is assumed to be AUTOCONNECT_URI defined in AutoConnectDefs.h.</span></dd>
<dd><span class="apidef">AC_ONBOOTURI_HOME</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">It is redirected to the uri specified by [**AutoConnectConfig::homeUri**](apiconfig.md#homeuri).</span></dd>
<dd><span class="apidef">AC_ONBOOTURI_HOME</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">It is redirected to the URI specified by [**AutoConnectConfig::homeUri**](apiconfig.md#homeuri).</span></dd>
</dl>
### <i class="fa fa-caret-right"></i> boundaryOffset
@ -198,7 +198,7 @@ Sets subnet mask for Soft AP in captive portal. When AutoConnect fails the initi
### <i class="fa fa-caret-right"></i> portalTimeout
Specify the timeout value of the captive portal in [ms] units. It is valid when the station is not connected and does not time out if the station is connected to the ESP module in SoftAP mode (ie Attempting WiFi connection with the portal function). If 0, the captive portal will not be timed-out.
Specify the timeout value of the captive portal in [ms] units. It is valid when the station is not connected and does not time out if the station is connected to the ESP module in SoftAP mode (i.e. Attempting WiFi connection with the portal function). If 0, the captive portal will not be timed-out.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">unsigned long</span><span class="apidesc">Captive portal timeout value. The default value is 0.</span></dd>
@ -253,6 +253,36 @@ Set the subnetmask when using static IP address.
<dd>IPAddress</dd>
</dl>
### <i class="fa fa-caret-right"></i> ticker
Set flicker signal output according to WiFi connection status during AutoConnect::begin behavior.
<dl class="apidl">
<dt>**Type**</dt>
<dd>bool</dd>
<dt>**Value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">Output the flicker signal while [AutoConnect::begin](api.md#begin) operation. The **AUTOCONNECT_TICKER_PORT** macro defined in the `AutoConnectDefs.h` header file assigns pins for signal output. The default pin is arduino variants LED_BUILTIN. For boards without the LED\_BUILTIN pin, assume pin #2.</span></dd>
<dd><span class="apidef">false</span>No flicker signal output.<span class="apidesc"></span></dd>
</dl>
### <i class="fa fa-caret-right"></i> tickerPort
Specifies the GPIO port number to output the flicker signal of the ticker. The default assumes on the board dependent definition **LED\_BUILTIN** macro redefined by **AUTOCONNECT\_TICKER\_PORT** in `AutoConnectDefs.h`.
<dl class="apidl">
<dt>**Type**</dt>
<dd>uint8_t</dd>
</dl>
### <i class="fa fa-caret-right"></i> tickerOn
Specifies the active logic level of the flicker signal. This value indicates the active signal level when driving the ticker.
<dl class="apidl">
<dt>**Type**</dt>
<dd>uint8_t</dd>
<dt>**Value**</dt>
<dd><span class="apidef">LOW</span>A flicker signal is an active-high.<span class="apidesc"></span></dd>
<dd><span class="apidef">HIGH</span>A flicker signal is an active-low.<span class="apidesc"></span></dd>
</dl>
### <i class="fa fa-caret-right"></i> title
Set the menu title.

@ -3,13 +3,14 @@
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectButton(const char* name = "", const char* value = "", const String& action = String())
AutoConnectButton(const char* name = "", const char* value = "", const String& action = String(), const ACPosterior_t post = AC_Tag_None)
```
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">name</span><span class="apidesc">The element name.</span></dd>
<dd><span class="apidef">value</span><span class="apidesc">Value of the element.</span></dd>
<dd><span class="apidef">action</span><span class="apidesc">Native code of the action script executed when the button is clicked.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -40,6 +41,19 @@ The element name.
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> value
Value of the element.
@ -66,7 +80,7 @@ Returns type of AutoConnectElement.
### <i class="fa fa-code"></i> Constructor
```cpp
explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false)
AutoConnectCheckbox(const char* name = "", const char* value = "", const char* label = "", const bool checked = false, const ACPosition_t labelPosition = AC_Behind, const ACPosterior_t post = AC_Tag_BR)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -74,6 +88,8 @@ Returns type of AutoConnectElement.
<dd><span class="apidef">value</span><span class="apidesc">Value of the element.</span></dd>
<dd><span class="apidef">label</span><span class="apidesc">A label string prefixed to the checkbox.</span></dd>
<dd><span class="apidef">check</span><span class="apidesc">Checked state of the checkbox.</span></dd>
<dd><span class="apidef">labelPosition</span><span class="apidesc">Specifies the position of the label to generate.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -102,6 +118,18 @@ A label is an optional string. A label is always arranged on the right side of t
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> labelPosition
Specifies the position of the label to generate with ACPostion_t enumeration value.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosition_t</span><span class="apidesc">
- **`AC_Infront`** : Place a label in front of the check box.
- **`AC_Behind`** : Place a label behind the check box.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> name
The element name.
@ -110,6 +138,19 @@ The element name.
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> value
Value of the element. It becomes a value attribute of an HTML `#!html <input type="checkbox">` tag.
@ -136,12 +177,13 @@ Returns type of AutoConnectElement.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectElement(const char* name = "", const char* value = "")
AutoConnectElement(const char* name = "", const char* value = "", const ACPosterior_t post = AC_Tag_None)
```
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">name</span><span class="apidesc">The element name.</span></dd>
<dd><span class="apidef">value</span><span class="apidesc">Value of the element.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -170,6 +212,19 @@ Value of the element. It is output as HTML as it is as a source for generating H
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member functions
#### <i class="fa fa-caret-right"></i> typeOf
@ -191,7 +246,7 @@ AutoConnectElement& as<T>(void)
Casts the reference to the AutoConnectElement the specified type.
<dl class="apidl">
<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>
<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), [AutoConnectStyle](apielements.md#autoconnectstyle),[AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).</span></dd>
<dt>**Return value**</dt>
<dd>A reference to the AutoConnectElement with actual type.</dd>
</dl>
@ -201,7 +256,7 @@ Casts the reference to the AutoConnectElement the specified type.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectFile(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS)
AutoConnectFile(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS, const ACPosterior_t post = AC_Tag_BR)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -209,7 +264,7 @@ AutoConnectFile(const char* name = "", const char* value = "", const char* label
<dd><span class="apidef">value</span><span class="apidesc">File name to be upload.</span></dd>
<dd><span class="apidef">label</span><span class="apidesc">Label string.</span></dd>
<dd><span class="apidef">store</span><span class="apidesc">The **ACFile_t** enumerator that represents the media to save the uploaded file.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -246,6 +301,19 @@ The element name.
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> size
Size of the uploading file.
@ -293,7 +361,7 @@ Returns type of AutoConnectFile.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "")
AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "", const ACPosterior_t post = AC_Tag_BR)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -302,6 +370,7 @@ AutoConnectInput(const char* name = "", const char* value = "", const char* labe
<dd><span class="apidef">label</span><span class="apidesc">Label string.</span></dd>
<dd><span class="apidef">pattern</span><span class="apidesc">Regular expression string for checking data format.</span></dd>
<dd><span class="apidef">placeholder</span><span class="apidesc">A placeholder string.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -354,6 +423,19 @@ A placeholder is an option string. Specification of a placeholder will generate
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member functions
#### <i class="fa fa-caret-right"></i> isValid
@ -384,7 +466,7 @@ Returns type of AutoConnectElement.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectRadio(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0)
AutoConnectRadio(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0, const ACPosterior_t post = AC_Tag_BR)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -393,6 +475,7 @@ AutoConnectRadio(const char* name = "", std::vector<String> const& values = {},
<dd><span class="apidef">label</span><span class="apidesc">Label string.</span></dd>
<dd><span class="apidef">order</span><span class="apidesc">The direction to arrange the radio buttons.</span></dd>
<dd><span class="apidef">checked</span><span class="apidesc">An index to be checked in the radio buttons.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -441,6 +524,19 @@ Specifies the direction to arrange the radio buttons. A label will place in the
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> values
An array of String type for the radio button options. It is an initialization list can be used. The `#!html <input type="radio">` tags will be generated from each entry in the values.
@ -537,7 +633,7 @@ Returns current checked option of the radio buttons.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectSelect(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0)
AutoConnectSelect(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0, const ACPosterior_t post = AC_Tag_BR)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -545,6 +641,7 @@ AutoConnectSelect(const char* name = "", std::vector<String> const& options = {}
<dd><span class="apidef">options</span><span class="apidesc">An array of options of the select element. Specifies a [std::vector](https://en.cppreference.com/w/cpp/container/vector) object.</span></dd>
<dd><span class="apidef">label</span><span class="apidesc">Label string.</span></dd>
<dd><span class="apidef">selected</span><span class="apidesc">An option should be pre-selected when the page loads.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -581,6 +678,19 @@ An array of String type for the selection options. It is an initialization list
<dd><span class="apidef">std::vector&lt;String&gt;</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> selected
A `selected` is an optional value. Specifies 1-based index value of an options array that an option should be pre-selected when the page loads.
@ -672,18 +782,71 @@ Returns current selected option of the select list.
<dd>A String of an option current selected. If there is no select option, a null string returned.</dd>
</dl>
## AutoConnectStyle
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectStyle(const char* name = "", const char* value = "")
```
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">name</span><span class="apidesc">The element name.</span></dd>
<dd><span class="apidef">value</span><span class="apidesc">Raw CSS code to insert into a style block in a custom web page to generate.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
#### <i class="fa fa-caret-right"></i> enable
Enable HTML tag generation for the element. AutoConnect will generate the element into HTML only if the enable attribute is true.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">boolean</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> name
The element name.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> value
Raw CSS code to insert into a style block in a custom web page to generate.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
### <i class="fa fa-code"></i> Public member functions
#### <i class="fa fa-caret-right"></i> typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
<dl class="apidl">
<dt>**Return value**</dt>
<dd>AC_Style</dd>
</dl>
## AutoConnectSubmit
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectSubmit(const char* name = "", const char* value ="", char* uri = "")
AutoConnectSubmit(const char* name = "", const char* value ="", char* uri = "", const ACPosterior_t post = AC_Tag_None)
```
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">name</span><span class="apidesc">The element name.</span></dd>
<dd><span class="apidef">value</span><span class="apidesc">The name of the submit button as an HTML `#!html <input type="button">` tag, it will also be the label of the button.</span></dd>
<dd><span class="apidef">uri</span><span class="apidesc">Destination URI.</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -704,6 +867,19 @@ The element name.
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> uri
Destination URI.
@ -738,7 +914,7 @@ Returns type of AutoConnectElement.
### <i class="fa fa-code"></i> Constructor
```cpp
AutoConnectText(const char* name = "", const char* value = "", const char* style = "", const char* format = "")
AutoConnectText(const char* name = "", const char* value = "", const char* style = "", const char* format = "", const ACPosterior_t post = AC_Tag_None)
```
<dl class="apidl">
<dt>**Parameters**</dt>
@ -746,6 +922,7 @@ AutoConnectText(const char* name = "", const char* value = "", const char* style
<dd><span class="apidef">value</span><span class="apidesc">String of content for the text element.</span></dd>
<dd><span class="apidef">style</span><span class="apidesc">A style code with CSS format that qualifiers the text.</span></dd>
<dd><span class="apidef">format</span><span class="apidesc">A pointer to a null-terminated multibyte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions</span></dd>
<dd><span class="apidef">post</span><span class="apidesc">Specifies the tag to be output afterward the element.</span></dd>
</dl>
### <i class="fa fa-code"></i> Public member variables
@ -774,6 +951,19 @@ The element name.
<dd><span class="apidef">String</span><span class="apidesc"></span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> post
Specifies a tag to add behind the HTML code generated from the element.
<dl class="apidl">
<dt>**Type**</dt>
<dd><span class="apidef">ACPosterior_t</span><span class="apidesc">
- **`AC_Tag_None`** : No generate additional tags.
- **`AC_Tag_BR`** : Add a `<br>` tag to the end of the element.
- **`AC_Tag_P`** : Include the element in the `<p> ~ </p>` tag.
</span></dd>
</dl>
#### <i class="fa fa-caret-right"></i> style
A style code with CSS format that qualifiers the text.

@ -1,3 +1,11 @@
#### [0.9.11] July 13, 2019
- Supports new element as AutoConnectSytle that can insert the custom CSS into AutoConnectAux page.
- Supports that `<br>` tags can now be added to each element.
- Supports that able to place the checkbox label forward or backward.
- Supports flicker signal output according to the status of WiFi_mode.
- Supports [**AutoConnectAux::fetchElement**](apiaux.md#fetchelement) function to retrieve inputted element values via a custom Web page.
- Fixed bug in AutoConnectCredential when offset is >256.
#### [0.9.10] June 12, 2019
- Fixed the unable to get AutoConnectElemets values in the sketch with ESP8266 arduino core 2.5.2.

@ -9,9 +9,9 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="99.565193mm"
height="272.12399mm"
viewBox="0 0 99.565193 272.12399"
width="99.56517mm"
height="304.07242mm"
viewBox="0 0 99.56517 304.07241"
version="1.1"
id="svg8776"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
@ -233,12 +233,12 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4142136"
inkscape:cx="350.72493"
inkscape:cy="591.29489"
inkscape:cx="192.80115"
inkscape:cy="364.94967"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-global="true"
showgrid="false"
inkscape:snap-global="false"
inkscape:snap-bbox="true"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
@ -261,8 +261,8 @@
<inkscape:grid
type="xygrid"
id="grid9104"
originx="-23.598344"
originy="-16.404155" />
originx="-23.598368"
originy="15.544285" />
</sodipodi:namedview>
<metadata
id="metadata8773">
@ -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>
@ -280,40 +280,15 @@
inkscape:label="レイヤー 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-23.598344,-8.4718652)">
transform="translate(-23.598368,-8.4718652)">
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,32.416658 v 3.96875"
d="m 58.208334,32.416659 v 4.08568"
id="path9639-1"
inkscape:connector-curvature="0" />
<g
id="g9322"
transform="translate(-25.135403,-130.96875)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="189.47736"
x="277.58359"
height="18.355465"
width="18.355474"
id="rect9184-6-3-4"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188"
y="158.61438"
x="70.845284"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190"
style="line-height:1em;fill:#d40055;fill-opacity:1;stroke-width:0.26458332"
y="158.61438"
x="70.845284"
sodipodi:role="line">immediateStart</tspan></text>
</g>
<g
id="g9353"
transform="translate(-15.875002,-80.697917)">
transform="translate(-15.875002,-48.749459)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -338,7 +313,7 @@
</g>
<g
id="g10108"
transform="translate(-42.333331,-3.1749998)">
transform="translate(-42.333331,28.77345)">
<rect
transform="matrix(0.945946,0.32432418,-0.945946,0.32432418,0,0)"
ry="3.6888673e-006"
@ -363,7 +338,7 @@
</g>
<g
id="g9385"
transform="translate(-1.3229192,-84.66667)">
transform="translate(-1.3229192,-52.718212)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -386,7 +361,8 @@
sodipodi:role="line">WiFi.scanNetworks</tspan></text>
</g>
<g
id="g1026">
id="g1026"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -414,7 +390,8 @@
sodipodi:role="line">matched credential</tspan></text>
</g>
<g
id="g1014">
id="g1014"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -438,7 +415,7 @@
</g>
<g
id="g9353-2"
transform="translate(-15.875002,-13.229167)">
transform="translate(-15.875002,18.719279)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -463,7 +440,7 @@
</g>
<g
id="g9622"
transform="translate(-68.285876,18.615978)">
transform="translate(-68.285876,50.564436)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -516,7 +493,7 @@
inkscape:connector-curvature="0" />
<g
id="g9714"
transform="translate(-78.07551,4.0638529)">
transform="translate(-78.07551,36.012307)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -538,33 +515,29 @@
id="tspan9136-4-0-9-8"
sodipodi:role="line">WiFi.softAP</tspan></text>
</g>
<g
id="g9746"
transform="translate(-19.843798,-39.555244)">
<rect
ry="0.26458257"
rx="0.26458332"
y="175.2917"
x="108.47922"
height="7.9375019"
width="34.395828"
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"
id="rect9134-4-7-4-6-0"
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" />
width="34.395828"
height="7.9375019"
x="88.635422"
y="167.68488"
rx="0.26458332"
ry="0.26458257" />
<text
id="text9138-7-3-9-0-6"
y="180.44255"
x="110.44085"
xml:space="preserve"
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="180.44255"
x="110.44085"
x="90.597054"
y="172.83572"
id="text9138-7-3-9-0-6"><tspan
sodipodi:role="line"
id="tspan9136-4-0-9-8-9"
sodipodi:role="line">START Web Server</tspan></text>
</g>
x="90.597054"
y="172.83572"
style="stroke-width:0.26458332">START Web Server</tspan></text>
<g
id="g9778"
transform="translate(-43.656245,-1.1906199)">
transform="translate(-43.656245,30.757831)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -588,7 +561,7 @@
</g>
<g
id="g9746-3"
transform="translate(-67.492182,-15.779896)">
transform="translate(-67.492182,16.16855)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -612,7 +585,7 @@
</g>
<g
id="g9834"
transform="translate(-79.374976,-2.3812481)">
transform="translate(-79.374976,29.567202)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -636,7 +609,8 @@
sodipodi:role="line">portalTimeout</tspan></text>
</g>
<g
id="g1006">
id="g1006"
transform="translate(0,31.948452)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -666,16 +640,16 @@
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" />
style="opacity:0.66000001;fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<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" />
style="opacity:0.66000001;fill:none;stroke:#000000;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g9353-2-8"
transform="translate(-15.875002,88.900003)">
transform="translate(-15.875002,120.84858)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -699,7 +673,8 @@
sodipodi:role="line">CONNECTED</tspan></text>
</g>
<g
id="g11043">
id="g11043"
transform="translate(0,31.948452)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
@ -724,7 +699,7 @@
</g>
<g
id="g9980"
transform="translate(-9.2604205,-8.8635315)">
transform="translate(-9.2604205,23.084915)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -748,7 +723,7 @@
</g>
<g
id="g10054"
transform="translate(-1.3229224,65.748961)">
transform="translate(-1.3229224,97.697415)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -777,12 +752,12 @@
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,44.322908 v 3.96875"
d="m 58.208333,76.271366 v 3.96875"
id="path9639-1-3"
inkscape:connector-curvature="0" />
<g
id="g9659"
transform="translate(-34.395836,1.3229159)">
transform="translate(-34.395836,33.271369)">
<rect
ry="0.26458257"
rx="0.26458332"
@ -806,138 +781,138 @@
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 105.83333,143.8064 V 265.60094 H 92.604167"
d="M 105.83333,175.75504 V 297.54958 H 92.604167"
id="path9639-1-3-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458329px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 75.563113,54.244669 30.107867,-0.06083 0.0306,81.420331"
d="m 75.563113,86.193127 30.107867,-0.06083 0.0306,81.420513"
id="path10088"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,60.197908 v 3.96875"
d="m 58.208333,92.146366 v 3.96875"
id="path9639-1-3-1"
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 58.208333,76.072908 v 3.96875"
d="m 58.208333,108.02141 v 3.96877"
id="path9639-1-3-1-7"
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 58.208333,87.979158 v 3.96875"
d="m 58.208333,119.92773 v 3.96877"
id="path9639-1-3-1-7-9"
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 58.208333,99.885408 v 3.968752"
d="m 58.208333,131.83404 v 3.96876"
id="path9639-1-3-1-7-9-4"
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 58.208333,111.79166 v 3.96875"
d="m 58.208333,143.7403 v 3.96875"
id="path9639-1-3-1-7-9-4-4"
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 58.208333,127.66666 v 3.96875"
d="m 58.208333,159.6153 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8"
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 58.184947,143.63681 v 3.96875"
d="m 58.184947,175.58545 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3"
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 58.184947,155.54306 v 3.96875"
d="m 58.184947,187.4917 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9"
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 58.208333,131.63541 v 3.96875"
d="m 58.208333,163.58405 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-5"
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 40.845696,26.549382 -17.114957,-0.09412 0.08176,105.180148 h 34.395832"
style="fill:none;stroke:#000000;stroke-width:0.26458329px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 40.845696,26.589892 23.730739,26.467079 23.812499,163.71219 H 58.208331"
id="path10088-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10923)"
d="m 24.291915,70.119854 h 16.45392"
d="m 24.291915,102.06832 h 16.45392"
id="path10088-92"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,167.48646 v 3.96875"
d="m 58.208333,199.4351 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5"
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 58.208333,179.52499 v 3.96875"
d="m 58.208333,211.47363 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1"
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 58.208333,199.36877 v 3.96875"
d="m 58.208333,231.31741 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-3"
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 58.208333,213.92085 v 3.96875"
d="m 58.208333,245.86949 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-3-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstart)"
d="m 57.679167,183.22916 -33.866667,0.13255 0.0073,40.48128 h 16.92604"
d="m 57.679167,215.1778 -33.866667,0.13255 0.0073,40.48128 h 16.92604"
id="path10088-92-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,183.49374 v 3.96875"
d="m 58.208333,215.44238 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9"
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 58.208333,229.79582 v 3.96875"
d="m 58.208333,261.74446 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8"
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 58.208333,233.76457 v 3.96875"
d="m 58.208333,265.71321 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10931)"
d="m 58.7375,234.02852 33.866674,-0.13255 -0.0073,-40.48128 H 75.670833"
d="m 58.7375,265.97716 33.866674,-0.13255 -0.0073,-40.48128 H 75.670833"
id="path10088-92-6-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208333,261.81041 v 3.96875"
d="m 58.208333,293.75905 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8-5"
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 58.208333,249.63957 v 3.96875"
d="m 58.208333,281.58821 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-5-8"
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 58.208333,265.77916 v 3.96875"
d="m 58.208333,297.7278 v 3.96875"
id="path9639-1-3-1-7-9-4-4-8-3-9-5-1-9-8-5-4"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker10937)"
d="m 58.7375,265.6464 33.734352,-0.0718 -0.007,-21.90474 H 75.538509"
d="m 58.7375,297.59504 33.734352,-0.0718 -0.007,-21.90474 H 75.538509"
id="path10088-92-6-8-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
@ -967,49 +942,49 @@
xml:space="preserve"
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"
x="35.860859"
y="69.289612"
y="101.23806"
id="text10760-5-4"><tspan
sodipodi:role="line"
id="tspan10758-9-7"
x="35.860859"
y="69.289612"
y="101.23806"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="53.414608"
y="85.363075"
id="text10760-1"><tspan
sodipodi:role="line"
id="tspan10758-2"
x="76.719864"
y="53.414608"
y="85.363075"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="62.554363"
y="94.502831"
id="text10760-5-5"><tspan
sodipodi:role="line"
id="tspan10758-9-6"
x="60.544109"
y="62.554363"
y="94.502831"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="60.844864"
y="78.423164"
y="110.3716"
id="text10760-1-0"><tspan
sodipodi:role="line"
id="tspan10758-2-1"
x="60.844864"
y="78.423164"
y="110.3716"
style="stroke-width:0.26458332">YES</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 75.257782,121.71354 30.310608,0.13228"
d="m 75.257782,153.66218 30.310608,0.13228"
id="path10088-92-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -1017,89 +992,214 @@
xml:space="preserve"
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"
x="76.719864"
y="120.88336"
y="152.83147"
id="text10760-1-3"><tspan
sodipodi:role="line"
id="tspan10758-2-13"
x="76.719864"
y="120.88336"
y="152.83147"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="130.02312"
y="161.97112"
id="text10760-5-5-6"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0"
x="60.544109"
y="130.02312"
y="161.97112"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="201.46062"
y="233.40862"
id="text10760-5-5-6-4"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0"
x="60.544109"
y="201.46062"
y="233.40862"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="192.32086"
y="224.26886"
id="text10760-1-3-5"><tspan
sodipodi:role="line"
id="tspan10758-2-13-1"
x="76.719864"
y="192.32086"
y="224.26886"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.844864"
y="231.8815"
y="263.82974"
id="text10760-1-3-7"><tspan
sodipodi:role="line"
id="tspan10758-2-13-5"
x="60.844864"
y="231.8815"
y="263.82974"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="35.860859"
y="222.74794"
y="254.69594"
id="text10760-5-5-6-4-8"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0-2"
x="35.860859"
y="222.74794"
y="254.69594"
style="stroke-width:0.26458332">NO</tspan></text>
<text
xml:space="preserve"
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"
x="76.719864"
y="242.46483"
y="274.41339"
id="text10760-1-3-7-8"><tspan
sodipodi:role="line"
id="tspan10758-2-13-5-2"
x="76.719864"
y="242.46483"
y="274.41339"
style="stroke-width:0.26458332">YES</tspan></text>
<text
xml:space="preserve"
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"
x="60.544109"
y="251.73145"
y="283.68027"
id="text10760-5-5-6-4-8-0"><tspan
sodipodi:role="line"
id="tspan10758-9-6-0-0-2-9"
x="60.544109"
y="251.73145"
y="283.68027"
style="stroke-width:0.26458332">NO</tspan></text>
<g
id="g2540"
transform="translate(0.132299)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="25.565748"
x="86.960411"
height="18.355465"
width="18.355474"
id="rect9184-6-3-8-7"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777273;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188-0-35"
y="43.602272"
x="45.906498"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190-3-0"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;line-height:1em;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;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332"
y="43.602272"
x="45.906498"
sodipodi:role="line">SSID &amp; Password</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 58.208331,48.448734 v 3.968749"
id="path9639-1-1"
inkscape:connector-curvature="0" />
<g
id="g9322"
transform="translate(-25.135403,-130.96875)">
<rect
transform="matrix(0.94594599,0.32432418,-0.94594599,0.32432418,0,0)"
ry="3.6888673e-006"
rx="3.6888673e-006"
y="189.47736"
x="277.58359"
height="18.355465"
width="18.355474"
id="rect9184-6-3-4"
style="opacity:0.66000001;vector-effect:none;fill:#e7f3ff;fill-opacity:1;stroke:#000000;stroke-width:0.33777279;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill" />
<text
id="text9188"
y="158.61438"
x="70.845284"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;line-height:1em;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
id="tspan9190"
style="line-height:1em;fill:#d40055;fill-opacity:1;stroke-width:0.26458332"
y="158.61438"
x="70.845284"
sodipodi:role="line">immediateStart</tspan></text>
</g>
<g
id="g2636">
<g
transform="translate(0,-3.1750001)"
id="g2615">
<rect
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"
id="rect9134-4-7-4-8"
width="34.395828"
height="7.9375019"
x="41.010422"
y="55.700027"
rx="0.26458332"
ry="0.26458257" />
<text
xml:space="preserve"
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"
x="44.447163"
y="60.54702"
id="text9138-7-3-9-8"><tspan
sodipodi:role="line"
id="tspan9136-4-0-9-4"
x="44.447163"
y="60.54702"
style="stroke-width:0.26458332">WiFi.disconnect()</tspan></text>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 58.208331,60.594821 V 64.56357"
id="path9639-1-1-3"
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 41.085466,42.413935 -10.12458,-0.0196 0.01766,22.036862 h 27.103849"
id="path10088-9-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 58.208331,64.232821 V 68.20157"
id="path9639-1-1-3-1"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
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"
x="26.330828"
y="37.121212"
id="text10760-5-9"><tspan
sodipodi:role="line"
id="tspan10758-9-8"
x="26.330828"
y="37.121212"
style="stroke-width:0.26458332">Not</tspan><tspan
sodipodi:role="line"
x="26.330828"
y="41.089962"
style="stroke-width:0.26458332"
id="tspan2758">presented</tspan></text>
<text
xml:space="preserve"
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"
x="60.844868"
y="50.651817"
id="text10760-2"><tspan
sodipodi:role="line"
id="tspan10758-99"
x="60.844868"
y="50.651817"
style="stroke-width:0.26458332">Specified</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 62 KiB

@ -2,8 +2,8 @@
* AutoConnect class implementation.
* @file AutoConnect.cpp
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-25
* @version 0.9.11
* @date 2019-07-09
* @copyright MIT license.
*/
@ -59,6 +59,7 @@ void AutoConnect::_initialize(void) {
#endif
_aux.release();
_auxUri = String("");
_ticker.reset();
}
/**
@ -103,6 +104,13 @@ bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long
if (_apConfig.hostName.length())
SET_HOSTNAME(_apConfig.hostName.c_str());
// Start Ticker according to the WiFi condition with Ticker is available.
if (_apConfig.ticker) {
_ticker.reset(new AutoConnectTicker(_apConfig.tickerPort, _apConfig.tickerOn));
if (WiFi.status() != WL_CONNECTED)
_ticker->start(AUTOCONNECT_FLICKER_PERIODDC, (uint8_t)AUTOCONNECT_FLICKER_WIDTHDC);
}
// Advance configuration for STA mode.
#ifdef AC_DEBUG
String staip_s = _apConfig.staip.toString();
@ -195,6 +203,10 @@ bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long
_currentHostIP = WiFi.softAPIP();
AC_DBG("SoftAP %s/%s Ch(%d) IP:%s %s\n", _apConfig.apid.c_str(), _apConfig.psk.c_str(), _apConfig.channel, _currentHostIP.toString().c_str(), _apConfig.hidden ? "hidden" : "");
// Start ticker with AP_STA
if (_ticker)
_ticker->start(AUTOCONNECT_FLICKER_PERIODAP, (uint8_t)AUTOCONNECT_FLICKER_WIDTHAP);
// Fork to the exit routine that starts captive portal.
cs = _onDetectExit ? _onDetectExit(_currentHostIP) : true;
@ -250,6 +262,11 @@ bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long
if (!_responsePage)
_startWebServer();
// Stop ticker
if (cs)
if (_ticker)
_ticker->stop();
return cs;
}
@ -323,6 +340,8 @@ void AutoConnect::end(void) {
break;
}
}
_ticker.reset();
}
/**

@ -2,8 +2,8 @@
* Declaration of AutoConnect class and accompanying AutoConnectConfig class.
* @file AutoConnect.h
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-25
* @version 0.9.11
* @date 2019-07-08
* @copyright MIT license.
*/
@ -32,6 +32,7 @@ using WebServerClass = WebServer;
#include "AutoConnectPage.h"
#include "AutoConnectCredential.h"
#include "AutoConnectAux.h"
#include "AutoConnectTicker.h"
/**< A type to save established credential at WiFi.begin automatically. */
typedef enum AC_SAVECREDENTIAL {
@ -69,6 +70,9 @@ class AutoConnectConfig {
immediateStart(false),
retainPortal(false),
portalTimeout(AUTOCONNECT_CAPTIVEPORTAL_TIMEOUT),
ticker(false),
tickerPort(AUTOCONNECT_TICKER_PORT),
tickerOn(LOW),
hostName(String("")),
homeUri(AUTOCONNECT_HOMEURI),
title(AUTOCONNECT_MENU_TITLE),
@ -98,6 +102,9 @@ class AutoConnectConfig {
immediateStart(false),
retainPortal(false),
portalTimeout(portalTimeout),
ticker(false),
tickerPort(AUTOCONNECT_TICKER_PORT),
tickerOn(LOW),
hostName(String("")),
homeUri(AUTOCONNECT_HOMEURI),
title(AUTOCONNECT_MENU_TITLE),
@ -127,6 +134,9 @@ class AutoConnectConfig {
immediateStart = o.immediateStart;
retainPortal = o.retainPortal;
portalTimeout = o.portalTimeout;
ticker = o.ticker;
tickerPort = o.tickerPort;
tickerOn = o.tickerOn;
hostName = o.hostName;
homeUri = o.homeUri;
title = o.title;
@ -155,6 +165,9 @@ class AutoConnectConfig {
bool immediateStart; /**< Skips WiFi.begin(), start portal immediately */
bool retainPortal; /**< Even if the captive portal times out, it maintains the portal state. */
unsigned long portalTimeout; /**< Timeout value for stay in the captive portal */
bool ticker; /**< Drives LED flicker according to WiFi connection status. */
uint8_t tickerPort; /**< GPIO for flicker */
uint8_t tickerOn; /**< A signal for flicker turn on */
String hostName; /**< host name */
String homeUri; /**< A URI of user site */
String title; /**< Menu title */
@ -285,6 +298,7 @@ class AutoConnect {
#ifdef ARDUINO_ARCH_ESP32
WiFiEventId_t _disconnectEventId; /**< STA disconnection event handler registered id */
#endif
std::unique_ptr<AutoConnectTicker> _ticker; /**< */
/** HTTP header information of the currently requested page. */
IPAddress _currentHostIP; /**< host IP address */

@ -36,6 +36,7 @@ const char AutoConnectAux::_PAGE_AUX[] PROGMEM = {
"{{CSS_INPUT_BUTTON}}"
"{{CSS_INPUT_TEXT}}"
"{{CSS_LUXBAR}}"
"{{AUX_CSS}}"
"</style>"
"</head>"
"<body style=\"padding-top:58px;\">"
@ -105,6 +106,29 @@ void AutoConnectAux::add(AutoConnectElementVT addons) {
add(element);
}
/**
* Parses the query parameters contained in the http request and fetches
* the value of AutoConnectElements carried by AutoConnectAux.
*/
void AutoConnectAux::fetchElement(void) {
WebServerClass* _webServer = _ac->_webServer.get();
if (_webServer->hasArg(String(F(AUTOCONNECT_AUXURI_PARAM)))) {
_ac->_auxUri = _webServer->arg(String(F(AUTOCONNECT_AUXURI_PARAM)));
_ac->_auxUri.replace("&#47;", "/");
AC_DBG("fetch %s", _ac->_auxUri.c_str());
AutoConnectAux* aux = _ac->_aux.get();
while (aux) {
if (aux->_uriStr == _ac->_auxUri) {
// Save the value owned by each element contained in the POST body
// of a current HTTP request to AutoConnectElements.
aux->_storeElements(_webServer);
break;
}
aux = aux->_next.get();
}
}
}
/**
* Get already registered AutoConnectElement.
* @param name Element name
@ -384,21 +408,7 @@ const String AutoConnectAux::_insertElement(PageArgument& args) {
// If the current request argument contains AutoConnectElement, it is
// the form data of the AutoConnectAux page and with this timing save
// the value of each element.
WebServerClass* _webServer = _ac->_webServer.get();
if (_webServer->hasArg(String(F(AUTOCONNECT_AUXURI_PARAM)))) {
_ac->_auxUri = _webServer->arg(String(F(AUTOCONNECT_AUXURI_PARAM)));
_ac->_auxUri.replace("&#47;", "/");
AutoConnectAux* aux = _ac->_aux.get();
while (aux) {
if (aux->_uriStr == _ac->_auxUri) {
// Save the value owned by each element contained in the POST body
// of a current HTTP request to AutoConnectElements.
aux->_storeElements(_webServer);
break;
}
aux = aux->_next.get();
}
}
fetchElement();
// Call user handler before HTML generation.
if (_handler) {
@ -409,8 +419,14 @@ const String AutoConnectAux::_insertElement(PageArgument& args) {
}
// Generate HTML for all AutoConnectElements contained in the page.
for (AutoConnectElement& addon : _addonElm)
for (AutoConnectElement& addon : _addonElm) {
// Since the style sheet has already drained at the time of the
// _insertElement function call, it skips the call to the HTML
// generator by each element.
if (addon.typeOf() != AC_Style)
// Invoke an HTML generator by each element
body += addon.toHTML();
}
// Call user handler after HTML generation.
if (_handler) {
@ -422,6 +438,21 @@ const String AutoConnectAux::_insertElement(PageArgument& args) {
return body;
}
/**
* Insert user defined CSS code to AutoConnectAux page.
* @param args A reference of PageArgument but unused.
* @return HTML string that should be inserted.
*/
const String AutoConnectAux::_insertStyle(PageArgument& args) {
String css = String("");
for (AutoConnectElement& elm : _addonElm) {
if (elm.typeOf() == AC_Style)
css += elm.toHTML();
}
return css;
}
/**
* Generate an auxiliary page assembled with the AutoConnectElement.
* This function is the core procedure of AutoConnectAux, and uses
@ -455,6 +486,7 @@ PageElement* AutoConnectAux::_setupPage(const String& uri) {
elm->addToken(String(FPSTR("CSS_INPUT_BUTTON")), std::bind(&AutoConnect::_token_CSS_INPUT_BUTTON, mother, std::placeholders::_1));
elm->addToken(String(FPSTR("CSS_INPUT_TEXT")), std::bind(&AutoConnect::_token_CSS_INPUT_TEXT, mother, std::placeholders::_1));
elm->addToken(String(FPSTR("CSS_LUXBAR")), std::bind(&AutoConnect::_token_CSS_LUXBAR, mother, std::placeholders::_1));
elm->addToken(String(FPSTR("AUX_CSS")), std::bind(&AutoConnectAux::_insertStyle, this, std::placeholders::_1));
elm->addToken(String(FPSTR("MENU_PRE")), std::bind(&AutoConnect::_token_MENU_PRE, mother, std::placeholders::_1));
elm->addToken(String(FPSTR("MENU_AUX")), std::bind(&AutoConnect::_token_MENU_AUX, mother, std::placeholders::_1));
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, mother, std::placeholders::_1));
@ -499,6 +531,7 @@ void AutoConnectAux::_storeElements(WebServerClass* webServer) {
}
}
}
AC_DBG_DUMB(",elements stored\n");
}
#ifdef AUTOCONNECT_USE_JSON
@ -618,6 +651,10 @@ AutoConnectElement* AutoConnectAux::_createElement(const JsonObject& json) {
AutoConnectSelect* cert_elm = new AutoConnectSelect;
return reinterpret_cast<AutoConnectElement*>(cert_elm);
}
case AC_Style: {
AutoConnectStyle* cert_elm = new AutoConnectStyle;
return reinterpret_cast<AutoConnectElement*>(cert_elm);
}
case AC_Submit: {
AutoConnectSubmit* cert_elm = new AutoConnectSubmit;
return reinterpret_cast<AutoConnectElement*>(cert_elm);
@ -892,6 +929,7 @@ ACElement_t AutoConnectAux::_asElementType(const String& type) {
{ AUTOCONNECT_JSON_TYPE_ACINPUT, AC_Input },
{ AUTOCONNECT_JSON_TYPE_ACRADIO, AC_Radio },
{ AUTOCONNECT_JSON_TYPE_ACSELECT, AC_Select },
{ AUTOCONNECT_JSON_TYPE_ACSTYLE, AC_Style },
{ AUTOCONNECT_JSON_TYPE_ACSUBMIT, AC_Submit },
{ AUTOCONNECT_JSON_TYPE_ACTEXT, AC_Text }
};

@ -53,6 +53,7 @@ class AutoConnectAux : public PageBuilder {
AutoConnectElement& operator[](const String& name) { return *getElement(name); }
void add(AutoConnectElement& addon); /**< Add an element to the auxiliary page */
void add(AutoConnectElementVT addons); /**< Add the element set to the auxiliary page */
void fetchElement(void); /**< Fetch AutoConnectElements values from http query parameters */
template<typename T>
T& getElement(const String& name);
AutoConnectElement* getElement(const String& name); /**< Get registered AutoConnectElement as specified name */
@ -92,6 +93,7 @@ class AutoConnectAux : public PageBuilder {
void _join(AutoConnect& ac); /**< Make a link to AutoConnect */
PageElement* _setupPage(const String& uri); /**< AutoConnectAux page builder */
const String _insertElement(PageArgument& args); /**< Insert a generated HTML to the page built by PageBuilder */
const String _insertStyle(PageArgument& args); /**< Insert CSS style */
const String _injectTitle(PageArgument& args) const { (void)(args); return _title; } /**< Returns title of this page to PageBuilder */
const String _injectMenu(PageArgument& args); /**< Inject menu title of this page to PageBuilder */
const String _indicateUri(PageArgument& args); /**< Inject the uri that caused the request */

@ -133,6 +133,23 @@ AutoConnectSelectBasis& AutoConnectAux::getElement(const String& name) {
return reinterpret_cast<AutoConnectSelectBasis&>(_nullElement());
}
/**
* Get AutoConnectStyleBasis element.
* @param name An element name.
* @return A reference of AutoConnectStyle class.
*/
template<>
AutoConnectStyleBasis& AutoConnectAux::getElement(const String& name) {
AutoConnectElement* elm = getElement(name);
if (elm) {
if (elm->typeOf() == AC_Style)
return *(reinterpret_cast<AutoConnectStyleBasis*>(elm));
else
AC_DBG("Element<%s> type mismatch<%d>\n", name.c_str(), elm->typeOf());
}
return reinterpret_cast<AutoConnectStyleBasis&>(_nullElement());
}
/**
* Get AutoConnectSubmitBasis element.
* @param name An element name.

@ -2,8 +2,8 @@
* Predefined AutoConnect configuration parameters.
* @file AutoConnectDefs.h
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-25
* @version 0.9.11
* @date 2019-07-08
* @copyright MIT license.
*/
@ -137,6 +137,32 @@
#define AUTOCONNECT_SD_SPEED 4000000
#endif // !AUTOCONNECT_SD_SPEED
// Flicker signal related factors
// Flicker cycle during AP operation [ms]
#ifndef AUTOCONNECT_FLICKER_PERIODAP
#define AUTOCONNECT_FLICKER_PERIODAP 1000
#endif // !AUTOCONNECT_FLICKER_PERIODAP
// Flicker cycle while WiFi is not connected [ms]
#ifndef AUTOCONNECT_FLICKER_PERIODDC
#define AUTOCONNECT_FLICKER_PERIODDC (AUTOCONNECT_FLICKER_PERIODAP << 1)
#endif // !AUTOCONNECT_FLICKER_PERIODDC
// Flicker pulse width during AP operation (8bit resolution)
#ifndef AUTOCONNECT_FLICKER_WIDTHAP
#define AUTOCONNECT_FLICKER_WIDTHAP 96
#endif // !AUTOCONNECT_FLICKER_WIDTHAPSTA
// Flicker pulse width while WiFi is not connected (8bit resolution)
#ifndef AUTOCONNECT_FLICKER_WIDTHDC
#define AUTOCONNECT_FLICKER_WIDTHDC 16
#endif // !AUTOCONNECT_FLICKER_WIDTHDISCON
// Ticker port
#ifndef AUTOCONNECT_TICKER_PORT
#if defined(BUILDIN_LED) || defined(LED_BUILTIN)
#define AUTOCONNECT_TICKER_PORT LED_BUILTIN
#else // Native pin for the arduino
#define AUTOCONNECT_TICKER_PORT 2
#endif
#endif
// ArduinoJson buffer size
#ifndef AUTOCONNECT_JSONBUFFER_SIZE
#define AUTOCONNECT_JSONBUFFER_SIZE 256

@ -21,6 +21,7 @@ using AutoConnectFile = AutoConnectFileJson;
using AutoConnectInput = AutoConnectInputJson;
using AutoConnectRadio = AutoConnectRadioJson;
using AutoConnectSelect = AutoConnectSelectJson;
using AutoConnectStyle = AutoConnectStyleJson;
using AutoConnectSubmit = AutoConnectSubmitJson;
using AutoConnectText = AutoConnectTextJson;
#define AUTOCONNECT_JSON_BUFFER_SIZE 256
@ -32,6 +33,7 @@ using AutoConnectFile = AutoConnectFileBasis;
using AutoConnectInput = AutoConnectInputBasis;
using AutoConnectRadio = AutoConnectRadioBasis;
using AutoConnectSelect = AutoConnectSelectBasis;
using AutoConnectStyle = AutoConnectStyleBasis;
using AutoConnectSubmit = AutoConnectSubmitBasis;
using AutoConnectText = AutoConnectTextBasis;
#endif // !AUTOCONNECT_USE_JSON
@ -49,6 +51,7 @@ using AutoConnectText = AutoConnectTextBasis;
#define ACRadio(n, ...) AutoConnectRadio n(#n, ##__VA_ARGS__)
#define ACSelect(n, ...) AutoConnectSelect n(#n, ##__VA_ARGS__)
#define ACSubmit(n, ...) AutoConnectSubmit n(#n, ##__VA_ARGS__)
#define ACStyle(n, ...) AutoConnectStyle n(#n, ##__VA_ARGS__)
#define ACText(n, ...) AutoConnectText n(#n, ##__VA_ARGS__)
#endif // _AUTOCONNECTELEMENT_H_

@ -2,8 +2,8 @@
* Declaration of AutoConnectElement basic class.
* @file AutoConnectElementBasis.h
* @author hieromon@gmail.com
* @version 0.9.8
* @date 2019-03-11
* @version 0.9.11
* @date 2019-06-25
* @copyright MIT license.
*/
@ -14,6 +14,19 @@
#include <memory>
#include "AutoConnectUpload.h"
// AC_AUTOCONNECTELEMENT_ON_VIRTUAL macro absorbs the difference of
// inheritance attribute of AutoConnectElement depending on the use of JSON.
// In a configuration using JSON, the base class of each
// AutoConnectElement is a virtual inheritance.
#ifdef AUTOCONNECT_USE_JSON
#define AC_AUTOCONNECTELEMENT_ON_VIRTUAL virtual
#else
#define AC_AUTOCONNECTELEMENT_ON_VIRTUAL
#endif
// A set of enumerators of types and attributes subordinate to
// AutoConnectElements
typedef enum {
AC_Button,
AC_Checkbox,
@ -22,6 +35,7 @@ typedef enum {
AC_Input,
AC_Radio,
AC_Select,
AC_Style,
AC_Submit,
AC_Text,
AC_Unknown = -1
@ -38,6 +52,17 @@ typedef enum {
AC_File_Extern
} ACFile_t; /**< AutoConnectFile media type */
typedef enum {
AC_Tag_None = 0,
AC_Tag_BR = 1,
AC_Tag_P = 2
} ACPosterior_t; /**< Tag to be generated following element */
typedef enum {
AC_Infront,
AC_Behind
} ACPosition_t; /**< Position of label subordinate to element */
/**
* AutoConnectAux element base.
* Placed a raw text that can be added by user sketch.
@ -46,12 +71,13 @@ typedef enum {
*/
class AutoConnectElementBasis {
public:
explicit AutoConnectElementBasis(const char* name = "", const char* value = "") : name(String(name)), value(String(value)), enable(true) {
explicit AutoConnectElementBasis(const char* name = "", const char* value = "", const ACPosterior_t post = AC_Tag_None) : name(String(name)), value(String(value)), post(post), enable(true) {
_type = AC_Element;
}
virtual ~AutoConnectElementBasis() {}
virtual const String toHTML(void) const { return enable ? value : String(""); }
ACElement_t typeOf(void) const { return _type; }
const String posterior(const String& s) const;
#ifndef AUTOCONNECT_USE_JSON
template<typename T>
T& as(void);
@ -59,6 +85,7 @@ class AutoConnectElementBasis {
String name; /**< Element name */
String value; /**< Element value */
ACPosterior_t post; /**< Tag to be generated with posterior */
bool enable; /**< Enabling the element */
protected:
@ -72,9 +99,9 @@ class AutoConnectElementBasis {
* @param value Value string with the placed button.
* @param action Script code to execute with the button pushed.
*/
class AutoConnectButtonBasis : virtual public AutoConnectElementBasis {
class AutoConnectButtonBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectButtonBasis(const char* name = "", const char* value = "", const String& action = String("")) : AutoConnectElementBasis(name, value), action(String(action)) {
explicit AutoConnectButtonBasis(const char* name = "", const char* value = "", const String& action = String(""), const ACPosterior_t post = AC_Tag_None) : AutoConnectElementBasis(name, value, post), action(String(action)) {
_type = AC_Button;
}
~AutoConnectButtonBasis() {}
@ -91,9 +118,9 @@ class AutoConnectButtonBasis : virtual public AutoConnectElementBasis {
* @param label A label string that follows checkbox, optionally.
* The label is placed on the right side of the checkbox.
*/
class AutoConnectCheckboxBasis : virtual public AutoConnectElementBasis {
class AutoConnectCheckboxBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false) : AutoConnectElementBasis(name, value), label(String(label)), checked(checked) {
explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false, const ACPosition_t labelPosition = AC_Behind, const ACPosterior_t post = AC_Tag_BR) : AutoConnectElementBasis(name, value, post), label(String(label)), checked(checked), labelPosition(labelPosition) {
_type = AC_Checkbox;
}
virtual ~AutoConnectCheckboxBasis() {}
@ -101,6 +128,7 @@ class AutoConnectCheckboxBasis : virtual public AutoConnectElementBasis {
String label; /**< A label for a subsequent input box */
bool checked; /**< The element should be pre-selected */
ACPosition_t labelPosition; /**< Output label according to ACPosition_t */
};
/**
@ -111,9 +139,9 @@ class AutoConnectCheckboxBasis : virtual public AutoConnectElementBasis {
* @param label A label string that follows file-select box, optionally.
* The label is placed in front of file-select box.
*/
class AutoConnectFileBasis : virtual public AutoConnectElementBasis {
class AutoConnectFileBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectFileBasis(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS) : AutoConnectElementBasis(name, value), label(String(label)), store(store) {
explicit AutoConnectFileBasis(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS, const ACPosterior_t post = AC_Tag_BR) : AutoConnectElementBasis(name, value, post), label(String(label)), store(store), size(0) {
_type = AC_File;
_upload.reset();
}
@ -140,9 +168,9 @@ class AutoConnectFileBasis : virtual public AutoConnectElementBasis {
* @param label A label string that follows Input-box, optionally.
* The label is placed in front of Input-box.
*/
class AutoConnectInputBasis : virtual public AutoConnectElementBasis {
class AutoConnectInputBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectInputBasis(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "") : AutoConnectElementBasis(name, value), label(String(label)), pattern(String(pattern)), placeholder(String(placeholder)) {
explicit AutoConnectInputBasis(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "", const ACPosterior_t post = AC_Tag_BR) : AutoConnectElementBasis(name, value, post), label(String(label)), pattern(String(pattern)), placeholder(String(placeholder)) {
_type = AC_Input;
}
virtual ~AutoConnectInputBasis() {}
@ -162,9 +190,9 @@ class AutoConnectInputBasis : virtual public AutoConnectElementBasis {
* @param label A label string that follows radio-buttons group.
* @param checked Index of check marked item.
*/
class AutoConnectRadioBasis : virtual public AutoConnectElementBasis {
class AutoConnectRadioBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectRadioBasis(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0) : AutoConnectElementBasis(name, ""), label(label), order(order), checked(checked), _values(values) {
explicit AutoConnectRadioBasis(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0, const ACPosterior_t post = AC_Tag_BR) : AutoConnectElementBasis(name, "", post), label(label), order(order), checked(checked), _values(values) {
_type = AC_Radio;
}
virtual ~AutoConnectRadioBasis() {}
@ -193,9 +221,9 @@ class AutoConnectRadioBasis : virtual public AutoConnectElementBasis {
* @param label A label string that follows Input-box, optionally.
* The label is placed in front of Input-box.
*/
class AutoConnectSelectBasis : virtual public AutoConnectElementBasis {
class AutoConnectSelectBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectSelectBasis(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0) : AutoConnectElementBasis(name, ""), label(String(label)), selected(selected), _options(options) {
explicit AutoConnectSelectBasis(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0, const ACPosterior_t post = AC_Tag_BR) : AutoConnectElementBasis(name, "", post), label(String(label)), selected(selected), _options(options) {
_type = AC_Select;
}
virtual ~AutoConnectSelectBasis() {}
@ -215,6 +243,19 @@ class AutoConnectSelectBasis : virtual public AutoConnectElementBasis {
std::vector<String> _options; /**< List options array */
};
/**
* An element class for inserting CSS in AutoConnectAux page.
* @param name Style name string.
* @param value CSS Native code.
*/
class AutoConnectStyleBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectStyleBasis(const char* name = "", const char* value = "") : AutoConnectElementBasis(name, value, AC_Tag_None) {
_type = AC_Style;
}
virtual ~AutoConnectStyleBasis() {}
};
/**
* Submit button arrangement class, a part of AutoConnectAux element.
* Place a submit button with a label that can be added by user sketch.
@ -224,9 +265,9 @@ class AutoConnectSelectBasis : virtual public AutoConnectElementBasis {
* @param value Sending value string.
* @param uri Sending uri string.
*/
class AutoConnectSubmitBasis : virtual public AutoConnectElementBasis {
class AutoConnectSubmitBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectSubmitBasis(const char* name = "", const char* value = "", const char* uri = "") : AutoConnectElementBasis(name, value), uri(String(uri)) {
explicit AutoConnectSubmitBasis(const char* name = "", const char* value = "", const char* uri = "", const ACPosterior_t post = AC_Tag_None) : AutoConnectElementBasis(name, value, post), uri(String(uri)) {
_type = AC_Submit;
}
virtual ~AutoConnectSubmitBasis() {}
@ -245,9 +286,9 @@ class AutoConnectSubmitBasis : virtual public AutoConnectElementBasis {
* An arrangement text would be placed with <div> contains. A string
* of style-codes are given for '<div style=>'.
*/
class AutoConnectTextBasis : virtual public AutoConnectElementBasis {
class AutoConnectTextBasis : AC_AUTOCONNECTELEMENT_ON_VIRTUAL public AutoConnectElementBasis {
public:
explicit AutoConnectTextBasis(const char* name = "", const char* value = "", const char* style = "", const char* format = "") : AutoConnectElementBasis(name, value), style(String(style)), format(String(format)) {
explicit AutoConnectTextBasis(const char* name = "", const char* value = "", const char* style = "", const char* format = "", const ACPosterior_t post = AC_Tag_None) : AutoConnectElementBasis(name, value, post), style(String(style)), format(String(format)) {
_type = AC_Text;
}
virtual ~AutoConnectTextBasis() {}
@ -304,6 +345,13 @@ inline AutoConnectSelectBasis& AutoConnectElementBasis::as<AutoConnectSelectBasi
return *(reinterpret_cast<AutoConnectSelectBasis*>(this));
}
template<>
inline AutoConnectStyleBasis& AutoConnectElementBasis::as<AutoConnectStyleBasis>(void) {
if (typeOf() != AC_Style)
AC_DBG("%s mismatched type as <%d>\n", name.c_str(), (int)typeOf());
return *(reinterpret_cast<AutoConnectStyleBasis*>(this));
}
template<>
inline AutoConnectSubmitBasis& AutoConnectElementBasis::as<AutoConnectSubmitBasis>(void) {
if (typeOf() != AC_Submit)

@ -2,8 +2,8 @@
* Implementation of AutoConnectElementBasis classes.
* @file AutoConnectElementImpl.h
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-23
* @version 0.9.11
* @date 2019-06-25
* @copyright MIT license.
*/
@ -19,13 +19,35 @@
#endif
#include "AutoConnectElementBasis.h"
/**
* Append post-tag accoring by the post attribute.
* @param s An original string
* @return A string that appended the post tag
*/
const String AutoConnectElementBasis::posterior(const String& s) const {
String html;
if (post == AC_Tag_BR)
html = s + String(F("<br>"));
else if (post == AC_Tag_P)
html = String("<p>") + s + String(F("</p>"));
else
html = s;
return html;
}
/**
* Generate an HTML <button> element. The onclick behavior depends on
* the code held in factionf member.
* @return An HTML string.
*/
const String AutoConnectButtonBasis::toHTML(void) const {
return enable ? String(F("<button type=\"button\" name=\"")) + name + String(F("\" value=\"")) + value + String(F("\" onclick=\"")) + action + String("\">") + value + String(F("</button>")) : String("");
String html = String("");
if (enable) {
html = String(F("<button type=\"button\" name=\"")) + name + String(F("\" value=\"")) + value + String(F("\" onclick=\"")) + action + String("\">") + value + String(F("</button>"));
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
/**
@ -44,8 +66,15 @@ const String AutoConnectCheckboxBasis::toHTML(void) const {
if (checked)
html += String(F(" checked"));
if (label.length())
html += String(F(" id=\"")) + name + String(F("\"><label for=\"")) + name + String("\">") + label + String(F("</label"));
html += String(F("><br>"));
html += String(F(" id=\"")) + name + String("\">");
if (label.length()) {
String labelTag = String(F("<label for=\"")) + name + String(F("\">")) + label + String(F("</label>"));
if (labelPosition == AC_Infront)
html = labelTag + html;
else if (labelPosition == AC_Behind)
html += labelTag;
}
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
@ -63,7 +92,8 @@ const String AutoConnectFileBasis::toHTML(void) const {
if (enable) {
if (label.length())
html = String(F("<label for=\"")) + name + String(F("\">")) + label + String(F("</label>"));
html += String(F("<input type=\"file\" id=\"")) + name + String(F("\" name=\"")) + name + String(F("\"><br>"));
html += String(F("<input type=\"file\" id=\"")) + name + String(F("\" name=\"")) + name + String("\">");
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
@ -115,7 +145,8 @@ const String AutoConnectInputBasis::toHTML(void) const {
html += String(F(" placeholder=\"")) + placeholder + String("\"");
if (value.length())
html += String(F(" value=\"")) + value + String("\"");
html += String(F("><br>"));
html += String(">");
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
@ -199,6 +230,7 @@ const String AutoConnectRadioBasis::toHTML(void) const {
if (order == AC_Vertical)
html += String(F("<br>"));
}
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
@ -261,6 +293,7 @@ const String AutoConnectSelectBasis::toHTML(void) const {
html += ">" + option + String(F("</option>"));
}
html += String(F("</select>"));
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
@ -280,7 +313,13 @@ const String& AutoConnectSelectBasis::value(void) const {
* @return String an HTML string.
*/
const String AutoConnectSubmitBasis::toHTML(void) const {
return enable ? String(F("<input type=\"button\" name=\"")) + name + String(F("\" value=\"")) + value + String(F("\" onclick=\"_sa('")) + uri + String("')\">") : String("");
String html = String("");
if (enable) {
html = String(F("<input type=\"button\" name=\"")) + name + String(F("\" value=\"")) + value + String(F("\" onclick=\"_sa('")) + uri + String("')\">");
html = AutoConnectElementBasis::posterior(html);
}
return html;
}
/**
@ -308,6 +347,7 @@ const String AutoConnectTextBasis::toHTML(void) const {
}
}
html += value_f + String(F("</div>"));
html = AutoConnectElementBasis::posterior(html);
}
return html;
}

@ -2,8 +2,8 @@
* Declaration of AutoConnectElement extended classes using JSON.
* @file AutoConnectElementJson.h
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-23
* @version 0.9.11
* @date 2019-06-25
* @copyright MIT license.
*/
@ -19,11 +19,13 @@
#define AUTOCONNECT_JSON_KEY_ELEMENT "element"
#define AUTOCONNECT_JSON_KEY_FORMAT "format"
#define AUTOCONNECT_JSON_KEY_LABEL "label"
#define AUTOCONNECT_JSON_KEY_LABELPOSITION "labelposition"
#define AUTOCONNECT_JSON_KEY_MENU "menu"
#define AUTOCONNECT_JSON_KEY_NAME "name"
#define AUTOCONNECT_JSON_KEY_OPTION "option"
#define AUTOCONNECT_JSON_KEY_PATTERN "pattern"
#define AUTOCONNECT_JSON_KEY_PLACEHOLDER "placeholder"
#define AUTOCONNECT_JSON_KEY_POSTERIOR "posterior"
#define AUTOCONNECT_JSON_KEY_SELECTED "selected"
#define AUTOCONNECT_JSON_KEY_STORE "store"
#define AUTOCONNECT_JSON_KEY_STYLE "style"
@ -38,11 +40,17 @@
#define AUTOCONNECT_JSON_TYPE_ACINPUT "ACInput"
#define AUTOCONNECT_JSON_TYPE_ACRADIO "ACRadio"
#define AUTOCONNECT_JSON_TYPE_ACSELECT "ACSelect"
#define AUTOCONNECT_JSON_TYPE_ACSTYLE "ACStyle"
#define AUTOCONNECT_JSON_TYPE_ACSUBMIT "ACSubmit"
#define AUTOCONNECT_JSON_TYPE_ACTEXT "ACText"
#define AUTOCONNECT_JSON_VALUE_BEHIND "behind"
#define AUTOCONNECT_JSON_VALUE_BR "br"
#define AUTOCONNECT_JSON_VALUE_EXTERNAL "extern"
#define AUTOCONNECT_JSON_VALUE_FS "fs"
#define AUTOCONNECT_JSON_VALUE_HORIZONTAL "horizontal"
#define AUTOCONNECT_JSON_VALUE_INFRONT "infront"
#define AUTOCONNECT_JSON_VALUE_NONE "none"
#define AUTOCONNECT_JSON_VALUE_PAR "par"
#define AUTOCONNECT_JSON_VALUE_SD "sd"
#define AUTOCONNECT_JSON_VALUE_VERTICAL "vertical"
@ -105,9 +113,10 @@ using ArduinoJsonBuffer = DynamicJsonDocument;
*/
class AutoConnectElementJson : virtual public AutoConnectElementBasis {
public:
explicit AutoConnectElementJson(const char* name = "", const char* value = "") {
explicit AutoConnectElementJson(const char* name = "", const char* value = "", const ACPosterior_t post = AC_Tag_None) : _defaultPost(AC_Tag_None) {
AutoConnectElementBasis::name = String(name);
AutoConnectElementBasis::value = String(value);
AutoConnectElementBasis::post = post;
}
~AutoConnectElementJson() {}
virtual size_t getObjectSize(void) const;
@ -119,6 +128,9 @@ class AutoConnectElementJson : virtual public AutoConnectElementBasis {
protected:
void _setMember(const JsonObject& json);
void _serialize(JsonObject& json);
protected:
ACPosterior_t _defaultPost;
};
/**
@ -131,10 +143,12 @@ class AutoConnectElementJson : virtual public AutoConnectElementBasis {
*/
class AutoConnectButtonJson : public AutoConnectElementJson, public AutoConnectButtonBasis {
public:
explicit AutoConnectButtonJson(const char* name = "", const char* value = "", const String& action = String("")) {
explicit AutoConnectButtonJson(const char* name = "", const char* value = "", const String& action = String(""), const ACPosterior_t post = AC_Tag_None) {
AutoConnectButtonBasis::name = String(name);
AutoConnectButtonBasis::value = String(value);
AutoConnectButtonBasis::action = String(action);
AutoConnectButtonBasis::post = post;
_defaultPost = AC_Tag_None;
}
~AutoConnectButtonJson() {}
size_t getObjectSize(void) const override;
@ -153,11 +167,14 @@ class AutoConnectButtonJson : public AutoConnectElementJson, public AutoConnectB
*/
class AutoConnectCheckboxJson : public AutoConnectElementJson, public AutoConnectCheckboxBasis {
public:
explicit AutoConnectCheckboxJson(const char* name = "", const char* value = "", const char* label = "", const bool checked = false) {
explicit AutoConnectCheckboxJson(const char* name = "", const char* value = "", const char* label = "", const bool checked = false, const ACPosition_t labelPosition = AC_Behind, const ACPosterior_t post = AC_Tag_BR) {
AutoConnectCheckboxBasis::name = String(name);
AutoConnectCheckboxBasis::value = String(value);
AutoConnectCheckboxBasis::label = String(label);
AutoConnectCheckboxBasis::checked = checked;
AutoConnectCheckboxBasis::labelPosition = labelPosition;
AutoConnectCheckboxBasis::post = post;
_defaultPost = AC_Tag_BR;
}
~AutoConnectCheckboxJson() {}
size_t getObjectSize(void) const override;
@ -176,11 +193,13 @@ class AutoConnectCheckboxJson : public AutoConnectElementJson, public AutoConnec
*/
class AutoConnectFileJson : public AutoConnectElementJson, public AutoConnectFileBasis {
public:
explicit AutoConnectFileJson(const char* name = "", const char* value= "", const char* label = "", const ACFile_t store = AC_File_FS) {
explicit AutoConnectFileJson(const char* name = "", const char* value= "", const char* label = "", const ACFile_t store = AC_File_FS, const ACPosterior_t post = AC_Tag_BR) {
AutoConnectFileBasis::name = String(name);
AutoConnectFileBasis::value = String(value);
AutoConnectFileBasis::label = String(label);
AutoConnectFileBasis::store = store;
AutoConnectFileBasis::post = post;
_defaultPost = AC_Tag_BR;
}
~AutoConnectFileJson() {}
size_t getObjectSize(void) const override;
@ -199,12 +218,14 @@ class AutoConnectFileJson : public AutoConnectElementJson, public AutoConnectFil
*/
class AutoConnectInputJson : public AutoConnectElementJson, public AutoConnectInputBasis {
public:
explicit AutoConnectInputJson(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "") {
explicit AutoConnectInputJson(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "", const ACPosterior_t post = AC_Tag_BR) {
AutoConnectInputBasis::name = String(name);
AutoConnectInputBasis::value = String(value);
AutoConnectInputBasis::label = String(label);
AutoConnectInputBasis::pattern = String(pattern);
AutoConnectInputBasis::placeholder = String(placeholder);
AutoConnectInputBasis::post = post;
_defaultPost = AC_Tag_BR;
}
~AutoConnectInputJson() {}
size_t getObjectSize(void) const override;
@ -222,12 +243,14 @@ class AutoConnectInputJson : public AutoConnectElementJson, public AutoConnectIn
*/
class AutoConnectRadioJson : public AutoConnectElementJson, public AutoConnectRadioBasis {
public:
explicit AutoConnectRadioJson(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0) {
explicit AutoConnectRadioJson(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0, const ACPosterior_t post = AC_Tag_BR) {
AutoConnectRadioBasis::name = String(name);
AutoConnectRadioBasis::_values = values;
AutoConnectRadioBasis::label = String(label);
AutoConnectRadioBasis::order = order;
AutoConnectRadioBasis::checked = checked;
AutoConnectRadioBasis::post = post;
_defaultPost = AC_Tag_BR;
}
~AutoConnectRadioJson() {}
size_t getObjectSize(void) const override;
@ -245,11 +268,13 @@ class AutoConnectRadioJson : public AutoConnectElementJson, public AutoConnectRa
*/
class AutoConnectSelectJson : public AutoConnectElementJson, public AutoConnectSelectBasis {
public:
explicit AutoConnectSelectJson(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0) {
explicit AutoConnectSelectJson(const char* name = "", std::vector<String> const& options = {}, const char* label = "", const uint8_t selected = 0, const ACPosterior_t post = AC_Tag_BR) {
AutoConnectSelectBasis::name = String(name);
AutoConnectSelectBasis::_options = options;
AutoConnectSelectBasis::label = String(label);
AutoConnectSelectBasis::selected = selected;
AutoConnectSelectBasis::post = post;
_defaultPost = AC_Tag_BR;
}
~AutoConnectSelectJson() {}
size_t getObjectSize(void) const override;
@ -257,6 +282,28 @@ class AutoConnectSelectJson : public AutoConnectElementJson, public AutoConnectS
void serialize(JsonObject& json) override;
};
/**
* CSS style arrangement class, a part of AutoConnectAux element.
* This element assumes CSS that came into effect as a style code will
* assign. Therefore, it does not check whether the CSS error exists in
* the value set in AutoConnectStyle. Also, because AutoConnect inserts
* its style code at the end of the style block on the AutoConnectAux
* page, it may affect the AutoConnect web page elements.
* @param name A style name string.
* @param value CSS style code.
*/
class AutoConnectStyleJson : public AutoConnectElementJson, public AutoConnectStyleBasis {
public:
explicit AutoConnectStyleJson(const char* name = "", const char* value = "") {
AutoConnectStyleBasis::name = String(name);
AutoConnectStyleBasis::value = String(value);
AutoConnectStyleBasis::post = AC_Tag_None;
}
~AutoConnectStyleJson() {}
bool loadMember(const JsonObject& json) override;
void serialize(JsonObject& json) override;
};
/**
* Submit button arrangement class, a part of AutoConnectAux element.
* Place a submit button with a label that can be added by user sketch.
@ -268,10 +315,12 @@ class AutoConnectSelectJson : public AutoConnectElementJson, public AutoConnectS
*/
class AutoConnectSubmitJson : public AutoConnectElementJson, public AutoConnectSubmitBasis {
public:
explicit AutoConnectSubmitJson(const char* name = "", const char* value = "", const char* uri = "") {
explicit AutoConnectSubmitJson(const char* name = "", const char* value = "", const char* uri = "", const ACPosterior_t post = AC_Tag_None) {
AutoConnectSubmitBasis::name = String(name);
AutoConnectSubmitBasis::value = String(value);
AutoConnectSubmitBasis::uri = String(uri);
AutoConnectSubmitBasis::post = post;
_defaultPost = AC_Tag_None;
}
~AutoConnectSubmitJson() {}
size_t getObjectSize(void) const override;
@ -290,11 +339,13 @@ class AutoConnectSubmitJson : public AutoConnectElementJson, public AutoConnectS
*/
class AutoConnectTextJson : public AutoConnectElementJson, public AutoConnectTextBasis {
public:
explicit AutoConnectTextJson(const char* name = "", const char* value = "", const char* style = "", const char* format = "") {
explicit AutoConnectTextJson(const char* name = "", const char* value = "", const char* style = "", const char* format = "", const ACPosterior_t post = AC_Tag_None) {
AutoConnectTextBasis::name = String(name);
AutoConnectTextBasis::value = String(value);
AutoConnectTextBasis::style = String(style);
AutoConnectTextBasis::format = String(format);
AutoConnectTextBasis::post = post;
_defaultPost = AC_Tag_None;
}
~AutoConnectTextJson() {}
size_t getObjectSize(void) const override;
@ -348,6 +399,13 @@ inline AutoConnectSelectJson& AutoConnectElementJson::as<AutoConnectSelectJson>(
return *(reinterpret_cast<AutoConnectSelectJson*>(this));
}
template<>
inline AutoConnectStyleJson& AutoConnectElementJson::as<AutoConnectStyleJson>(void) {
if (typeOf() != AC_Style)
AC_DBG("%s mismatched type as <%d>\n", name.c_str(), (int)typeOf());
return *(reinterpret_cast<AutoConnectStyleJson*>(this));
}
template<>
inline AutoConnectSubmitJson& AutoConnectElementJson::as<AutoConnectSubmitJson>(void) {
if (typeOf() != AC_Submit)

@ -2,8 +2,8 @@
* Implementation of AutoConnectElementJson classes.
* @file AutoConnectElementImpl.h
* @author hieromon@gmail.com
* @version 0.9.9
* @date 2019-05-23
* @version 0.9.11
* @date 2019-06-25
* @copyright MIT license.
*/
@ -16,10 +16,12 @@
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectElementJson::getObjectSize() const {
size_t AutoConnectElementJson::getObjectSize(void) const {
size_t size = JSON_OBJECT_SIZE(3);
size += sizeof(AUTOCONNECT_JSON_KEY_NAME) + sizeof(AUTOCONNECT_JSON_KEY_TYPE) + sizeof(AUTOCONNECT_JSON_KEY_VALUE) + sizeof(AUTOCONNECT_JSON_TYPE_ACELEMENT);
size += name.length() + 1 + value.length() + 1;
if (post != _defaultPost)
size += sizeof(AUTOCONNECT_JSON_KEY_POSTERIOR) + (sizeof(AUTOCONNECT_JSON_VALUE_BR) > sizeof(AUTOCONNECT_JSON_VALUE_PAR) ? sizeof(AUTOCONNECT_JSON_VALUE_BR) : sizeof(AUTOCONNECT_JSON_VALUE_PAR));
return size;
}
@ -55,6 +57,21 @@ void AutoConnectElementJson::serialize(JsonObject& json) {
*/
void AutoConnectElementJson::_serialize(JsonObject& json) {
json[F(AUTOCONNECT_JSON_KEY_NAME)] = name;
if (post != _defaultPost) {
String posterior;
switch (post) {
case AC_Tag_None:
posterior = AUTOCONNECT_JSON_VALUE_NONE;
break;
case AC_Tag_BR:
posterior = AUTOCONNECT_JSON_VALUE_BR;
break;
case AC_Tag_P:
posterior = AUTOCONNECT_JSON_VALUE_PAR;
break;
}
json[F(AUTOCONNECT_JSON_KEY_POSTERIOR)] = posterior;
}
}
/**
@ -65,13 +82,24 @@ void AutoConnectElementJson::_setMember(const JsonObject& json) {
name = json[F(AUTOCONNECT_JSON_KEY_NAME)].as<String>();
if (json.containsKey(F(AUTOCONNECT_JSON_KEY_VALUE)))
value = json[F(AUTOCONNECT_JSON_KEY_VALUE)].as<String>();
if (json.containsKey(F(AUTOCONNECT_JSON_KEY_POSTERIOR))) {
String posterior = json[F(AUTOCONNECT_JSON_KEY_POSTERIOR)].as<String>();
if (posterior.equalsIgnoreCase(F(AUTOCONNECT_JSON_VALUE_NONE)))
post = AC_Tag_None;
else if (posterior.equalsIgnoreCase(F(AUTOCONNECT_JSON_VALUE_BR)))
post = AC_Tag_BR;
else if (posterior.equalsIgnoreCase(F(AUTOCONNECT_JSON_VALUE_PAR)))
post = AC_Tag_P;
else
AC_DBG("Warning '%s' loading, unknown posterior '%s'\n", name.c_str(), posterior.c_str());
}
}
/**
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectButtonJson::getObjectSize() const {
size_t AutoConnectButtonJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(1);
size += sizeof(AUTOCONNECT_JSON_KEY_ACTION) + action.length() + 1;
return size;
@ -109,9 +137,9 @@ void AutoConnectButtonJson::serialize(JsonObject& json) {
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectCheckboxJson::getObjectSize() const {
size_t AutoConnectCheckboxJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(2);
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_CHECKED);
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_CHECKED) + sizeof(AUTOCONNECT_JSON_KEY_LABELPOSITION) + sizeof(AUTOCONNECT_JSON_VALUE_INFRONT);
return size;
}
@ -129,6 +157,17 @@ bool AutoConnectCheckboxJson::loadMember(const JsonObject& json) {
label = json[F(AUTOCONNECT_JSON_KEY_LABEL)].as<String>();
if (json.containsKey(F(AUTOCONNECT_JSON_KEY_CHECKED)))
checked = json[F(AUTOCONNECT_JSON_KEY_CHECKED)].as<bool>();
if (json.containsKey(F(AUTOCONNECT_JSON_KEY_LABELPOSITION))) {
String position = json[F(AUTOCONNECT_JSON_KEY_LABELPOSITION)].as<String>();
if (position.equalsIgnoreCase(F(AUTOCONNECT_JSON_VALUE_BEHIND)))
labelPosition = AC_Behind;
else if (position.equalsIgnoreCase(F(AUTOCONNECT_JSON_VALUE_INFRONT)))
labelPosition = AC_Infront;
else {
AC_DBG("Failed to load %s element, unknown label position:%s\n", name.c_str(), position.c_str());
return false;
}
}
return true;
}
return false;
@ -145,13 +184,15 @@ void AutoConnectCheckboxJson::serialize(JsonObject& json) {
json[F(AUTOCONNECT_JSON_KEY_VALUE)] = value;
json[F(AUTOCONNECT_JSON_KEY_LABEL)] = label;
json[F(AUTOCONNECT_JSON_KEY_CHECKED)] = checked;
if (labelPosition == AC_Infront)
json[F(AUTOCONNECT_JSON_KEY_LABELPOSITION)] = AUTOCONNECT_JSON_VALUE_INFRONT;
}
/**
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectFileJson::getObjectSize() const {
size_t AutoConnectFileJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(2);
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_STORE) + sizeof(AUTOCONNECT_JSON_VALUE_EXTERNAL);
return size;
@ -213,7 +254,7 @@ void AutoConnectFileJson::serialize(JsonObject& json) {
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectInputJson::getObjectSize() const {
size_t AutoConnectInputJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(3);
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_PATTERN) + pattern.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_PLACEHOLDER) + placeholder.length() + 1;
return size;
@ -257,7 +298,7 @@ void AutoConnectInputJson::serialize(JsonObject& json) {
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectRadioJson::getObjectSize() const {
size_t AutoConnectRadioJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(3) + JSON_ARRAY_SIZE(_values.size());
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_ARRANGE) + sizeof(AUTOCONNECT_JSON_VALUE_HORIZONTAL) + sizeof(AUTOCONNECT_JSON_KEY_CHECKED);
for (const String& _value : _values)
@ -328,7 +369,7 @@ void AutoConnectRadioJson::serialize(JsonObject& json) {
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectSelectJson::getObjectSize() const {
size_t AutoConnectSelectJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(2) + JSON_ARRAY_SIZE(_options.size());
size += sizeof(AUTOCONNECT_JSON_KEY_LABEL) + label.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_SELECTED);
for (const String& _option : _options)
@ -376,11 +417,36 @@ void AutoConnectSelectJson::serialize(JsonObject& json) {
json[F(AUTOCONNECT_JSON_KEY_SELECTED)] = selected;
}
/**
* Load an element member value from the JSON object.
* @param json JSON object with the definition of AutoConnectStyle.
* @return true AutoConnectStyle loaded
* @return false Type of AutoConnectStyle is mismatched.
*/
bool AutoConnectStyleJson::loadMember(const JsonObject& json) {
String type = json[F(AUTOCONNECT_JSON_KEY_TYPE)].as<String>();
if (type.equalsIgnoreCase(F(AUTOCONNECT_JSON_TYPE_ACSTYLE))) {
_setMember(json);
return true;
}
return false;
}
/**
* Serialize AutoConnectStyle to JSON.
* @param json JSON object to be serialized.
*/
void AutoConnectStyleJson::serialize(JsonObject& json) {
_serialize(json);
json[F(AUTOCONNECT_JSON_KEY_TYPE)] = String(F(AUTOCONNECT_JSON_TYPE_ACSTYLE));
json[F(AUTOCONNECT_JSON_KEY_VALUE)] = value;
}
/**
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectSubmitJson::getObjectSize() const {
size_t AutoConnectSubmitJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize();
size += sizeof(AUTOCONNECT_JSON_KEY_URI) + uri.length() + 1;
return size;
@ -418,7 +484,7 @@ void AutoConnectSubmitJson::serialize(JsonObject& json) {
* Returns JSON object size.
* @return An object size for JsonBuffer.
*/
size_t AutoConnectTextJson::getObjectSize() const {
size_t AutoConnectTextJson::getObjectSize(void) const {
size_t size = AutoConnectElementJson::getObjectSize() + JSON_OBJECT_SIZE(2);
size += sizeof(AUTOCONNECT_JSON_KEY_STYLE) + style.length() + 1 + sizeof(AUTOCONNECT_JSON_KEY_FORMAT) + format.length() + 1;
return size;

@ -115,19 +115,19 @@ const char AutoConnect::_CSS_UL[] PROGMEM = {
"text-align:right;"
"padding:10px 0.5em"
"}"
"ul.noorder>input[type=\"checkbox\"]{"
"ul.noorder input[type=\"checkbox\"]{"
"-moz-appearance:checkbox;"
"-webkit-appearance:checkbox"
"}"
"ul.noorder>input[type=\"radio\"]{"
"ul.noorder input[type=\"radio\"]{"
"margin-right:0.5em;"
"-moz-appearance:radio;"
"-webkit-appearance:radio"
"}"
"ul.noorder>input[type=\"text\"]{"
"ul.noorder input[type=\"text\"]{"
"width:auto"
"}"
"ul.noorder>input[type=\"text\"]:invalid{"
"ul.noorder input[type=\"text\"]:invalid{"
"background:#fce4d6"
"}"
};
@ -217,16 +217,9 @@ const char AutoConnect::_CSS_INPUT_TEXT[] PROGMEM = {
"input:disabled:hover{"
"cursor:not-allowed"
"}"
"input.error::-webkit-input-placeholder{"
"color:#D9434E"
"}"
"input.error:-moz-placeholder{"
"color:#D9434E"
"}"
"input.error::-moz-placeholder{"
"color:#D9434E"
"}"
"input.error:-ms-input-placeholder{"
"input.error::-webkit-input-placeholder,"
"input.error::-moz-placeholder,"
"input.error::-ms-input-placeholder{"
"color:#D9434E"
"}"
".aux-page label{"

@ -0,0 +1,56 @@
/**
* AutoConnectTicker class implementation.
* Provides a service that shows the flicker signal according to WiFi
* connection status.
* @file AutoConnect.cpp
* @author hieromon@gmail.com
* @version 0.9.11
* @date 2019-07-09
* @copyright MIT license.
*/
#include "AutoConnectTicker.h"
/**
* Start ticker cycle
* @param cycle Cycle time in [ms]
* @param duty Duty cycle in [ms]
*/
void AutoConnectTicker::start(const uint32_t cycle, const uint32_t duty) {
_cycle = cycle;
if (duty <= _cycle)
_duty = duty;
start();
}
/**
* Start ticker cycle
*/
void AutoConnectTicker::start(void) {
pinMode(_port, OUTPUT);
_pulse.detach();
_period.attach_ms<AutoConnectTicker*>(_cycle, AutoConnectTicker::_onPeriod, this);
}
/**
* Turn on the flicker signal and reserves a ticker to turn off the
* signal. This behavior will perform every cycle to generate the
* pseudo-PWM signal.
* If the function is registered, call the callback function at the
* end of one cycle.
* @param t Its own address
*/
void AutoConnectTicker::_onPeriod(AutoConnectTicker* t) {
digitalWrite(t->_port, t->_turnOn);
t->_pulse.once_ms<AutoConnectTicker*>(t->_duty, AutoConnectTicker::_onPulse, t);
if (t->_callback)
t->_callback();
}
/**
* Turn off the flicker signal
* @param t Its own address
*/
void AutoConnectTicker::_onPulse(AutoConnectTicker* t) {
digitalWrite(t->_port, !(t->_turnOn));
}

@ -0,0 +1,53 @@
/**
* Declaration of AutoConnectTicker class.
* @file AutoConnectTicker.h
* @author hieromon@gmail.com
* @version 0.9.11
* @date 2019-07-09
* @copyright MIT license.
*/
#ifndef _AUTOCONNECTTICKER_H_
#define _AUTOCONNECTTICKER_H_
#include <functional>
#if defined(ARDUINO_ARCH_ESP8266)
#include <ESP8266WiFi.h>
#elif defined(ARDUINO_ARCH_ESP32)
#include <WiFi.h>
#endif
#include <Ticker.h>
#include "AutoConnectDefs.h"
class AutoConnectTicker {
public:
explicit AutoConnectTicker(const uint8_t port = AUTOCONNECT_TICKER_PORT, const uint8_t active = LOW, const uint32_t cycle = 0, uint32_t duty = 0) : _cycle(cycle), _duty(duty), _port(port), _turnOn(active), _callback(nullptr) {
if (_duty > _cycle)
_duty = _cycle;
}
~AutoConnectTicker() { stop(); }
typedef std::function<void(void)> Callback_ft;
void setCycle(const uint32_t cycle) { _cycle = cycle; }
void setDuty(const uint32_t duty) { _duty = duty <= _cycle ? duty : _duty; }
void start(const uint32_t cycle, const uint32_t duty);
void start(const uint32_t cycle, const uint8_t width) { start(cycle, (uint32_t)((cycle * width) >> 8)); }
void start(void);
void stop(void) { _period.detach(); _pulse.detach(); digitalWrite(_port, !_turnOn); }
void onPeriod(Callback_ft cb) { _callback = cb ;}
protected:
Ticker _period; /**< Ticker for flicking cycle */
Ticker _pulse; /**< Ticker for pulse width generating */
uint32_t _cycle; /**< Cycle time in [ms] */
uint32_t _duty; /**< Pulse width in [ms] */
private:
static void _onPeriod(AutoConnectTicker* t);
static void _onPulse(AutoConnectTicker* t);
uint8_t _port; /**< Port to output signal */
uint8_t _turnOn; /**< Signal to turn on */
Callback_ft _callback; /**< An exit by every cycle */
};
#endif // !_AUTOCONNECTTICKER_H_
Loading…
Cancel
Save