Something extra
Icons¶
The library presents two PNG icons which can be used to embed a hyperlink to the AutoConnect menu.
- Bar type
- Cog type
To reference the icon, use the AUTOCONNECT_LINK macro in the Sketch. It expands into the string literal as an HTML <a></a>
tag with PNG embedded of the AutoConnect menu hyperlinks. Icon type is specified by the parameter of the macro.
- BAR_24Bars icon, 24x24.
- BAR_32Bars icon, 32x32.
- BAR_48Bars icon, 48x48.
- COG_16Cog icon, 16x16.
- COG_24Cog icon, 24x24.
- COG_32Cog icon, 32x32.
Usage
String html = "<html>";
html += AUTOCONNECT_LINK(BAR_32);
html += "</html>";
server.send(200, "text/html", html);
Captive Portal Availability Identification¶
A check mark icon can be displayed adjacent to the AutoConnect menu title to indicate that a captive portal is available. This check mark indicates that the ESP module is not connected to any access point, SoftAP is enabled, and DNS lookup spoofing is working through the AutoConnect-initiated DNS server.
This setting is enabled by turning on the AC_SHOW_PORTALIDENTIFIER macro defined in AutoConnectDefs.h header file.
#define AC_SHOW_PORTALIDENTIFIER
Using the PlatformIO as a build environment, you can enable it in the build_flags
setting without modifying the library's AutoConnectDefs.h source file.
platform = espressif32
framework = arduino
build_flags = -DAC_SHOW_PORTALIDENTIFIER