commit
ebb95cd8e5
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 4.3 KiB |
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,261 @@ |
|||||||
|
/**
|
||||||
|
* The template for the overring the hardcoded strings contained in |
||||||
|
* the AutoConnect pages. |
||||||
|
* e.g. for PlatformIO, you can add to platformio.ini in your project |
||||||
|
* along with AC_LABLES macro which specifies the user-defined label |
||||||
|
* constants as follows: |
||||||
|
* |
||||||
|
* build_flags = |
||||||
|
* -DAC_LABELS='"${PROJECT_SRC_DIR}/mylabels.h"' |
||||||
|
*
|
||||||
|
* And places mylabels.h, it needs a structure of the define directive |
||||||
|
* provided per label string definition for the change your wants. |
||||||
|
*
|
||||||
|
* #ifdef [ID YOU WANT TO CHANGE] |
||||||
|
* #undef [ID YOU WANT TO CHANGE] |
||||||
|
* #define [ID YOU WANT TO CHANGE] "NEW_STRING_FOR_THISONE" |
||||||
|
* #endif |
||||||
|
*
|
||||||
|
* Details are in the documentation. |
||||||
|
* https://hieromon.github.io/AutoConnect/changelabel.html
|
||||||
|
*/ |
||||||
|
|
||||||
|
// Menu item: Configure new AP
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_CONFIGNEW
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_CONFIGNEW
|
||||||
|
//#define AUTOCONNECT_MENULABEL_CONFIGNEW "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_CONFIGNEW
|
||||||
|
|
||||||
|
// Menu item: Open SSIDs
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_OPENSSIDS
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_OPENSSIDS
|
||||||
|
//#define AUTOCONNECT_MENULABEL_OPENSSIDS "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_OPENSSIDS
|
||||||
|
|
||||||
|
// Menu item: Disconnect
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_DISCONNECT
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_DISCONNECT
|
||||||
|
//#define AUTOCONNECT_MENULABEL_DISCONNECT "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_DISCONNECT
|
||||||
|
|
||||||
|
// Menu item: Reset...
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_RESET
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_RESET
|
||||||
|
//#define AUTOCONNECT_MENULABEL_RESET "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_RESET
|
||||||
|
|
||||||
|
// Menu item: HOME
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_HOME
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_HOME
|
||||||
|
//#define AUTOCONNECT_MENULABEL_HOME "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_HOME
|
||||||
|
|
||||||
|
// Menu item: Update
|
||||||
|
//#ifdef AUTOCONNECT_MENULABEL_UPDATE
|
||||||
|
//#undef AUTOCONNECT_MENULABEL_UPDATE
|
||||||
|
//#define AUTOCONNECT_MENULABEL_UPDATE "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENULABEL_UPDATE
|
||||||
|
|
||||||
|
// Button label: RESET
|
||||||
|
//#ifdef AUTOCONNECT_BUTTONLABEL_RESET
|
||||||
|
//#undef AUTOCONNECT_BUTTONLABEL_RESET
|
||||||
|
//#define AUTOCONNECT_BUTTONLABEL_RESET "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_BUTTONLABEL_RESET
|
||||||
|
|
||||||
|
// Page title: Page not found
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_NOTFOUND
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_NOTFOUND
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_NOTFOUND "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_NOTFOUND
|
||||||
|
|
||||||
|
// Page title: AutoConnect resetting
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_RESETTING
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_RESETTING
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_RESETTING "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_RESETTING
|
||||||
|
|
||||||
|
// Page title: AutoConnect statistics
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_STATISTICS
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_STATISTICS
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_STATISTICS "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_STATISTICS
|
||||||
|
|
||||||
|
// Page statistics row: Established connection
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
|
||||||
|
|
||||||
|
// Page statistics row: Mode
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_MODE
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_MODE
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_MODE "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_MODE
|
||||||
|
|
||||||
|
// Page statistics row: IP
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_IP
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_IP
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_IP "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_IP
|
||||||
|
|
||||||
|
// Page statistics row: GW
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_GATEWAY
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_GATEWAY
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_GATEWAY "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_GATEWAY
|
||||||
|
|
||||||
|
// Page statistics row: Subnet mask
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_SUBNETMASK
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_SUBNETMASK
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_SUBNETMASK "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_SUBNETMASK
|
||||||
|
|
||||||
|
// Page statistics row: SoftAP IP
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_SOFTAPIP
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_SOFTAPIP
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_SOFTAPIP "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_SOFTAPIP
|
||||||
|
|
||||||
|
// Page statistics row: AP MAC
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_APMAC
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_APMAC
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_APMAC "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_APMAC
|
||||||
|
|
||||||
|
// Page statistics row: STA MAC
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_STAMAC
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_STAMAC
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_STAMAC "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_STAMAC
|
||||||
|
|
||||||
|
// Page statistics row: Channel
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_CHANNEL
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_CHANNEL
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_CHANNEL "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_CHANNEL
|
||||||
|
|
||||||
|
// Page statistics row: dBm
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_DBM
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_DBM
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_DBM "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_DBM
|
||||||
|
|
||||||
|
// Page statistics row: Chip ID
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_CHIPID
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_CHIPID
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_CHIPID "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_CHIPID
|
||||||
|
|
||||||
|
// Page statistics row: CPU Freq.
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_CPUFREQ
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_CPUFREQ
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_CPUFREQ "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_CPUFREQ
|
||||||
|
|
||||||
|
// Page statistics row: Flash size
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_FLASHSIZE
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_FLASHSIZE
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_FLASHSIZE "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_FLASHSIZE
|
||||||
|
|
||||||
|
// Page statistics row: Free memory
|
||||||
|
//#ifdef AUTOCONNECT_PAGESTATS_FREEMEM
|
||||||
|
//#undef AUTOCONNECT_PAGESTATS_FREEMEM
|
||||||
|
//#define AUTOCONNECT_PAGESTATS_FREEMEM "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGESTATS_FREEMEM
|
||||||
|
|
||||||
|
// Page title: AutoConnect config
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_CONFIG
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_CONFIG
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_CONFIG "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_CONFIG
|
||||||
|
|
||||||
|
// Page config text: Total:
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_TOTAL
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_TOTAL
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_TOTAL "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_TOTAL
|
||||||
|
|
||||||
|
// Page config text: Hidden:
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_HIDDEN
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_HIDDEN
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_HIDDEN "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_HIDDEN
|
||||||
|
|
||||||
|
// Page config text: SSID
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_SSID
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_SSID
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_SSID "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_SSID
|
||||||
|
|
||||||
|
// Page config text: Passphrase
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_PASSPHRASE
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_PASSPHRASE
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_PASSPHRASE "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_PASSPHRASE
|
||||||
|
|
||||||
|
// Page config text: Enable DHCP
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_ENABLEDHCP
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_ENABLEDHCP
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_ENABLEDHCP "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_ENABLEDHCP
|
||||||
|
|
||||||
|
// Page config text: Apply
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONFIG_APPLY
|
||||||
|
//#undef AUTOCONNECT_PAGECONFIG_APPLY
|
||||||
|
//#define AUTOCONNECT_PAGECONFIG_APPLY "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONFIG_APPLY
|
||||||
|
|
||||||
|
// Page title: AutoConnect credentials
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_CREDENTIALS
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_CREDENTIALS
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_CREDENTIALS "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_CREDENTIALS
|
||||||
|
|
||||||
|
// Page title: AutoConnect connecting
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_CONNECTING
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_CONNECTING
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_CONNECTING "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_CONNECTING
|
||||||
|
|
||||||
|
// Page title: AutoConnect connection failed
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_CONNECTIONFAILED "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
|
||||||
|
|
||||||
|
// Page connection failed: Connection Failed
|
||||||
|
//#ifdef AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
|
||||||
|
//#undef AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
|
||||||
|
//#define AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
|
||||||
|
|
||||||
|
// Page title: AutoConnect disconnected
|
||||||
|
//#ifdef AUTOCONNECT_PAGETITLE_DISCONNECTED
|
||||||
|
//#undef AUTOCONNECT_PAGETITLE_DISCONNECTED
|
||||||
|
//#define AUTOCONNECT_PAGETITLE_DISCONNECTED "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_PAGETITLE_DISCONNECTED
|
||||||
|
|
||||||
|
// Text: No saved credentials.
|
||||||
|
//#ifdef AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
|
||||||
|
//#undef AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
|
||||||
|
//#define AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
|
||||||
|
|
||||||
|
// Menu Text: Connecting
|
||||||
|
//#ifdef AUTOCONNECT_MENUTEXT_CONNECTING
|
||||||
|
//#undef AUTOCONNECT_MENUTEXT_CONNECTING
|
||||||
|
//#define AUTOCONNECT_MENUTEXT_CONNECTING "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENUTEXT_CONNECTING
|
||||||
|
|
||||||
|
// Menu Text: Disconnect
|
||||||
|
//#ifdef AUTOCONNECT_MENUTEXT_DISCONNECT
|
||||||
|
//#undef AUTOCONNECT_MENUTEXT_DISCONNECT
|
||||||
|
//#define AUTOCONNECT_MENUTEXT_DISCONNECT "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENUTEXT_DISCONNECT
|
||||||
|
|
||||||
|
// Menu Text: Failed
|
||||||
|
//#ifdef AUTOCONNECT_MENUTEXT_FAILED
|
||||||
|
//#undef AUTOCONNECT_MENUTEXT_FAILED
|
||||||
|
//#define AUTOCONNECT_MENUTEXT_FAILED "NEW_STRING_YOU_WISH"
|
||||||
|
//#endif // !AUTOCONNECT_MENUTEXT_FAILED
|
@ -0,0 +1,120 @@ |
|||||||
|
## Change the item's label text |
||||||
|
|
||||||
|
You can change the text of AutoConnect menu items. The easiest way is to rewrite the header file directly in the library that defines the menu label. [Advanced Usage](advancedusage.md#change-the-menu-labels) section describes the detailed how to change the label text directly. |
||||||
|
|
||||||
|
However, this way is less preferred as it modifies the library code and further affects the entire Arduino project you compile. So, here's how to change the label text for each Arduino project without directly modifying the library code. Using this method, you can also display the label text and fixed text on AutoConnect pages in your national language. |
||||||
|
|
||||||
|
(e.g. in Japanese) |
||||||
|
<img src="images/localize.png"> |
||||||
|
|
||||||
|
### Preparation |
||||||
|
|
||||||
|
AutoConnect needs a definition file as c++ header (.h) to change the label text. It is used when your Arduino project is compiled, and there is no additional memory consumption due to changing the label text. This header file describes each fixed text of AutoConnect with the `#define` preprocessor directive. |
||||||
|
|
||||||
|
The next thing you need is [PlatformIO](https://platformio.org/). [PlatformIO](https://docs.platformio.org/en/latest/what-is-platformio.html#overview) is a very powerful environment for embedded development with multi-platform and multi-architecture build systems. And you can easily set up a PlatformIO for the Arduino development system as follows on your host machine. |
||||||
|
|
||||||
|
- [Microsoft Visual Studio Code](https://platformio.org/install/ide?install=vscode) |
||||||
|
- [PlatformIO IDE](https://platformio.org/platformio-ide) (included PlatformIO core) |
||||||
|
|
||||||
|
!!! info "Install PlatformIO and VSCode" |
||||||
|
Please refer to [the official documentation](https://docs.platformio.org/en/latest/ide/vscode.html#installation) for PlatformIO and VSCode installation. |
||||||
|
|
||||||
|
The rest of this section assumes that you have a PlatformIO environment with VSCode as the front end that has installed on your host machine. |
||||||
|
|
||||||
|
## How to change the label text |
||||||
|
|
||||||
|
### Label text replacement header file |
||||||
|
|
||||||
|
AutoConnect label texts are pre-assigned with a fixed string so that it can be determined at compile time. Their default definitions are in the [`AutoConnectLabels.h`](https://github.com/Hieromon/AutoConnect/blob/master/src/AutoConnectLabels.h) file that has all the replaceable label text defined by the `#define` directive. |
||||||
|
|
||||||
|
<table> |
||||||
|
<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>Open SSIDs</td><td>AUTOCONNECT_MENULABEL_OPENSSIDS</td></tr> |
||||||
|
<tr><td>Disconnect</td><td>AUTOCONNECT_MENULABEL_DISCONNECT</td></tr> |
||||||
|
<tr><td>Reset...</td><td>AUTOCONNECT_MENULABEL_RESET</td></tr> |
||||||
|
<tr><td>HOME</td><td>AUTOCONNECT_MENULABEL_HOME</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 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 connecting</td><td>AUTOCONNECT_PAGETITLE_CONNECTING</td></tr> |
||||||
|
<tr><td>AutoConnect connection failed</td><td>AUTOCONNECT_PAGETITLE_CONNECTIONFAILED</td></tr> |
||||||
|
<tr><td>AutoConnect credentials</td><td>AUTOCONNECT_PAGETITLE_CREDENTIALS</td></tr> |
||||||
|
<tr><td>AutoConnect disconnected</td><td>AUTOCONNECT_PAGETITLE_DISCONNECTED</td></tr> |
||||||
|
<tr><td>AutoConnect resetting</td><td>AUTOCONNECT_PAGETITLE_RESETTING</td></tr> |
||||||
|
<tr><td>AutoConnect statistics</td><td>AUTOCONNECT_PAGETITLE_STATISTICS</td></tr> |
||||||
|
<tr><td rowspan="14">Page:[statistics] row</td><td>Established connection</td><td>AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION</td></tr> |
||||||
|
<tr><td>Mode</td><td>AUTOCONNECT_PAGESTATS_MODE</td></tr> |
||||||
|
<tr><td>IP</td><td>AUTOCONNECT_PAGESTATS_IP</td></tr> |
||||||
|
<tr><td>GW</td><td>AUTOCONNECT_PAGESTATS_GATEWAY</td></tr> |
||||||
|
<tr><td>Subnet mask</td><td>AUTOCONNECT_PAGESTATS_SUBNETMASK</td></tr> |
||||||
|
<tr><td>SoftAP IP</td><td>AUTOCONNECT_PAGESTATS_SOFTAPIP</td></tr> |
||||||
|
<tr><td>AP MAC</td><td>AUTOCONNECT_PAGESTATS_APMAC</td></tr> |
||||||
|
<tr><td>STA MAC</td><td>AUTOCONNECT_PAGESTATS_STAMAC</td></tr> |
||||||
|
<tr><td>Channel</td><td>AUTOCONNECT_PAGESTATS_CHANNEL</td></tr> |
||||||
|
<tr><td>dBm</td><td>AUTOCONNECT_PAGESTATS_DBM</td></tr> |
||||||
|
<tr><td>Chip ID</td><td>AUTOCONNECT_PAGESTATS_CHIPID</td></tr> |
||||||
|
<tr><td>CPU Freq.</td><td>AUTOCONNECT_PAGESTATS_CPUFREQ</td></tr> |
||||||
|
<tr><td>Flash size</td><td>AUTOCONNECT_PAGESTATS_FLASHSIZE</td></tr> |
||||||
|
<tr><td>Free memory</td><td>AUTOCONNECT_PAGESTATS_FREEMEM</td></tr> |
||||||
|
<tr><td rowspan="6">Page:[config] text</td><td>Total:</td><td>AUTOCONNECT_PAGECONFIG_TOTAL</td></tr> |
||||||
|
<tr><td>Hidden:</td><td>AUTOCONNECT_PAGECONFIG_HIDDEN</td></tr> |
||||||
|
<tr><td>SSID</td><td>AUTOCONNECT_PAGECONFIG_SSID</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>Apply</td><td>AUTOCONNECT_PAGECONFIG_APPLY</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 rowspan="3">Menu Text</td><td>Connecting</td><td>AUTOCONNECT_MENUTEXT_CONNECTING</td></tr> |
||||||
|
<tr><td>Disconnect</td><td>AUTOCONNECT_MENUTEXT_DISCONNECT</td></tr> |
||||||
|
<tr><td>Failed</td><td>AUTOCONNECT_MENUTEXT_FAILED</td></tr> |
||||||
|
</table> |
||||||
|
|
||||||
|
The definition of label text must conform to a certain coding pattern. Undefine with `#undef` the `#define` directive corresponding to the above IDs, and then redefine the ID with the replacement text. And surround it with `#ifdef` ~ `#endif`. |
||||||
|
|
||||||
|
```cpp |
||||||
|
#ifdef AUTOCONNECT_MENULABEL_CONFIGNEW |
||||||
|
#undef AUTOCONNECT_MENULABEL_CONFIGNEW |
||||||
|
#define AUTOCONNECT_MENULABEL_CONFIGNEW "NEW_STRING_YOU_WISH" |
||||||
|
#endif |
||||||
|
``` |
||||||
|
|
||||||
|
You may not need to rewrite all definitions. It depends on your wishes and is sufficient that the above the include file contains only the labels you need. |
||||||
|
|
||||||
|
### Configuration of platformio.ini |
||||||
|
|
||||||
|
You prepare its header file and place it in the `src` folder of the project folder. You can name the file whatever you like, but for the sake of explanation, let's say `mylabels.h`. |
||||||
|
|
||||||
|
When you store `mylabels.h` containing the new label text definition in the `src` folder, your Arduino project folder structure should look like this: |
||||||
|
|
||||||
|
``` |
||||||
|
<Project folder> |
||||||
|
|-- <pio> |
||||||
|
|-- <.vscode> |
||||||
|
|-- <include> |
||||||
|
|-- <lib> |
||||||
|
|-- <src> |
||||||
|
| |-- main.cpp |
||||||
|
| |-- mylabels.h <-- Depends on the project |
||||||
|
|-- <test> |
||||||
|
|-- .gitignore |
||||||
|
|-- .travis.yml |
||||||
|
|-- platformio.ini |
||||||
|
``` |
||||||
|
|
||||||
|
Then, open [`platformio.ini`](https://docs.platformio.org/en/latest/projectconf.html) file and add new [`build_flags`](https://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags) for including `mylabels.h` to override the label text. |
||||||
|
|
||||||
|
```ini |
||||||
|
build_flags = -DAC_LABELS='"${PROJECT_SRC_DIR}/mylabels.h"' |
||||||
|
``` |
||||||
|
|
||||||
|
!!! hint "Just change the `mylabels.h`" |
||||||
|
Keep `-DAC_LABELS='"${PROJECT_SRC_DIR}/YOUR_FILE_NAME"'` when changing the above `build_flags` item to match your labels header file name. |
||||||
|
|
||||||
|
After placing the `mylabels.h` file and add the `build_flags`, build the project with the replaced label text. You will see the AutoConnect screen with the new text replaced by `mylabels.h`. |
||||||
|
|
||||||
|
!!! caution "Need clean-up before re-build with updated `mylabels.h`" |
||||||
|
When you have updated `mylabels.h`, you need deleting compiled library object files before build. Use `Clean` of a PlatformIO task on VSCode status bar. |
||||||
|
<p><img src="images/vscode_clean.png"></p> |
||||||
|
<p><img src="images/vscode_statusbar.png"></p> |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 4.3 KiB |
Loading…
Reference in new issue