Added menu description supplementary

pull/197/head
Hieromon Ikasamo 5 years ago
parent 47d80c723c
commit 78a3f2279b
  1. 45
      mkdocs/advancedusage.md
  2. 10
      mkdocs/changelabel.md
  3. BIN
      mkdocs/images/castmenu.png
  4. 2
      mkdocs/menu.md
  5. 2
      src/AutoConnectLabels.h

@ -199,7 +199,50 @@ To implement embedding your legacy web pages to the AutoConnect menu, you can us
5. [Begin](api.md#begin) the portal. 5. [Begin](api.md#begin) the portal.
6. Performs [*AutoConnect::handleClient*](api.md#handleClient) in the **loop** function. 6. Performs [*AutoConnect::handleClient*](api.md#handleClient) in the **loop** function.
For details, see section [Constructing the menu](menuize.md) of Examples page. ```cpp hl_lines="10 28 32"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <AutoConnect.h>
ESP8266WebServer server;
// Declaration for casting legacy page to AutoConnect menu.
// Specifies an uri and the menu label.
AutoConnect portal(server);
AutoConnectAux hello("/hello", "Hello"); // Step #1 as the above procedure
// Step #2 as the above procedure
// A conventional web page driven by the ESP8266WebServer::on handler.
// This is a legacy.
void handleHello() {
server.send(200, "text/html", String(F(
"<html>"
"<head><meta name='viewport' content='width=device-width,initial-scale=1.0'></head>"
"<body>Hello, world</body>"
"</html>"
)));
}
void setup() {
// Step #3 as the above procedure
// Register the "on" handler as usual to ESP8266WebServer.
// Match this URI with the URI of AutoConnectAux to cast.
server.on("/hello", handleHello);
// Step #4 as the above procedure
// Joins AutoConnectAux to cast the page via the handleRoot to AutoConnect.
portal.join({ hello });
portal.begin(); // Step #5 as the above procedure
}
void loop() {
portal.handleClient(); // Step #6 as the above procedure
}
```
<img width="232px" src="images/castmenu.png">
For more details, see section [Constructing the menu](menuize.md) of Examples page.
### <i class="fa fa-caret-right"></i> Change menu title ### <i class="fa fa-caret-right"></i> Change menu title

@ -29,13 +29,15 @@ AutoConnect label texts are pre-assigned with a fixed string so that it can be d
<table> <table>
<tr><th>Label placed</th><th>Pre-defined text</th><th>ID (#define macro)</th></tr> <tr><th>Label placed</th><th>Pre-defined text</th><th>ID (#define macro)</th></tr>
<tr><td rowspan="6">Menu item</td><td>Configure new AP</td><td>AUTOCONNECT_MENULABEL_CONFIGNEW</td></tr> <tr><td rowspan="7">Menu item</td><td>Configure new AP</td><td>AUTOCONNECT_MENULABEL_CONFIGNEW</td></tr>
<tr><td>Open SSIDs</td><td>AUTOCONNECT_MENULABEL_OPENSSIDS</td></tr> <tr><td>Open SSIDs</td><td>AUTOCONNECT_MENULABEL_OPENSSIDS</td></tr>
<tr><td>Disconnect</td><td>AUTOCONNECT_MENULABEL_DISCONNECT</td></tr> <tr><td>Disconnect</td><td>AUTOCONNECT_MENULABEL_DISCONNECT</td></tr>
<tr><td>Reset...</td><td>AUTOCONNECT_MENULABEL_RESET</td></tr> <tr><td>Reset...</td><td>AUTOCONNECT_MENULABEL_RESET</td></tr>
<tr><td>HOME</td><td>AUTOCONNECT_MENULABEL_HOME</td></tr> <tr><td>HOME</td><td>AUTOCONNECT_MENULABEL_HOME</td></tr>
<tr><td>Update</td><td>AUTOCONNECT_MENULABEL_UPDATE</td></tr> <tr><td>Update</td><td>AUTOCONNECT_MENULABEL_UPDATE</td></tr>
<tr><td>Button label</td><td>RESET</td><td>AUTOCONNECT_BUTTONLABEL_RESET</td></tr> <tr><td>Device info</td><td>AUTOCONNECT_MENULABEL_DEVINFO</td></tr>
<tr><td rowspan="2">Button label</td><td>RESET</td><td>AUTOCONNECT_BUTTONLABEL_RESET</td></tr>
<tr><td>UPDATE</td><td>AUTOCONNECT_BUTTONLABEL_UPDATE</td></tr>
<tr><td rowspan="8">Page title</td><td>Page not found</td><td>AUTOCONNECT_PAGETITLE_NOTFOUND</td></tr> <tr><td rowspan="8">Page title</td><td>Page not found</td><td>AUTOCONNECT_PAGETITLE_NOTFOUND</td></tr>
<tr><td>AutoConnect config</td><td>AUTOCONNECT_PAGETITLE_CONFIG</td></tr> <tr><td>AutoConnect config</td><td>AUTOCONNECT_PAGETITLE_CONFIG</td></tr>
<tr><td>AutoConnect connecting</td><td>AUTOCONNECT_PAGETITLE_CONNECTING</td></tr> <tr><td>AutoConnect connecting</td><td>AUTOCONNECT_PAGETITLE_CONNECTING</td></tr>
@ -64,6 +66,10 @@ AutoConnect label texts are pre-assigned with a fixed string so that it can be d
<tr><td>Passphrase</td><td>AUTOCONNECT_PAGECONFIG_PASSPHRASE</td></tr> <tr><td>Passphrase</td><td>AUTOCONNECT_PAGECONFIG_PASSPHRASE</td></tr>
<tr><td>Enable DHCP</td><td>AUTOCONNECT_PAGECONFIG_ENABLEDHCP</td></tr> <tr><td>Enable DHCP</td><td>AUTOCONNECT_PAGECONFIG_ENABLEDHCP</td></tr>
<tr><td>Apply</td><td>AUTOCONNECT_PAGECONFIG_APPLY</td></tr> <tr><td>Apply</td><td>AUTOCONNECT_PAGECONFIG_APPLY</td></tr>
<tr><td rowspan="4">Page:[update] text</td><td>Updating firmware</td><td>AUTOCONNECT_TEXT_UPDATINGFIRMWARE</td></tr>
<tr><td>Select firmware:</td><td>AUTOCONNECT_TEXT_SELECTFIRMWARE</td></tr>
<tr><td>Successfully updated, rebooting...</td><td>AUTOCONNECT_TEXT_OTASUCCESS</td></tr>
<tr><td>Failed to update:</td><td>AUTOCONNECT_TEXT_OTAFAILURE</td></tr>
<tr><td>Page:[connection failed]</td><td>Connection Failed</td><td>AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED</td></tr> <tr><td>Page:[connection failed]</td><td>Connection Failed</td><td>AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED</td></tr>
<tr><td>Text</td><td>No saved credentials.</td><td>AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS</td></tr> <tr><td>Text</td><td>No saved credentials.</td><td>AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS</td></tr>
<tr><td rowspan="3">Menu Text</td><td>Connecting</td><td>AUTOCONNECT_MENUTEXT_CONNECTING</td></tr> <tr><td rowspan="3">Menu Text</td><td>Connecting</td><td>AUTOCONNECT_MENUTEXT_CONNECTING</td></tr>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -12,7 +12,7 @@ The following screen will appear as the AutoConnect menu when you access to **Au
## <i class="fa fa-bars"></i> Right on top ## <i class="fa fa-bars"></i> Right on top
Currently, AutoConnect supports four menus. Undermost menu as "HOME" returns to the home path of its sketch. Currently, AutoConnect supports six menus. Undermost menu as "HOME" returns to the home path of its sketch.
- **Configure new AP**: Configure SSID and Password for new access point. - **Configure new AP**: Configure SSID and Password for new access point.
- **Open SSIDs**: Opens the past SSID which has been established connection from the flash. - **Open SSIDs**: Opens the past SSID which has been established connection from the flash.

@ -229,7 +229,7 @@
// Text: The update page caption // Text: The update page caption
#ifndef AUTOCONNECT_TEXT_UPDATINGFIRMWARE #ifndef AUTOCONNECT_TEXT_UPDATINGFIRMWARE
#define AUTOCONNECT_TEXT_UPDATINGFIRMWARE "Updating firmware via OTA" #define AUTOCONNECT_TEXT_UPDATINGFIRMWARE "Updating firmware"
#endif // !AUTOCONNECT_TEXT_UPDATINGFIRMWARE #endif // !AUTOCONNECT_TEXT_UPDATINGFIRMWARE
// Text: The update page's file selection button label // Text: The update page's file selection button label

Loading…
Cancel
Save