diff --git a/src/AutoConnect.h b/src/AutoConnect.h index 351f87e..3594a73 100644 --- a/src/AutoConnect.h +++ b/src/AutoConnect.h @@ -88,7 +88,7 @@ class AutoConnectConfig { immediateStart(false), retainPortal(false), portalTimeout(AUTOCONNECT_CAPTIVEPORTAL_TIMEOUT), - attachMenu(AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_HOME), + applyMenu(AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_HOME), ticker(false), tickerPort(AUTOCONNECT_TICKER_PORT), tickerOn(LOW), @@ -121,7 +121,7 @@ class AutoConnectConfig { immediateStart(false), retainPortal(false), portalTimeout(portalTimeout), - attachMenu(AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_HOME), + applyMenu(AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_HOME), ticker(false), tickerPort(AUTOCONNECT_TICKER_PORT), tickerOn(LOW), @@ -154,7 +154,7 @@ class AutoConnectConfig { immediateStart = o.immediateStart; retainPortal = o.retainPortal; portalTimeout = o.portalTimeout; - attachMenu = o.attachMenu; + applyMenu = o.applyMenu; ticker = o.ticker; tickerPort = o.tickerPort; tickerOn = o.tickerOn; @@ -186,7 +186,7 @@ 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 */ - uint16_t attachMenu; /**< A compound value of the menu items to be attached */ + uint16_t applyMenu; /**< A compound value of the menu items to be attached */ 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 */ diff --git a/src/AutoConnectPage.cpp b/src/AutoConnectPage.cpp index 93d641a..c0e4069 100644 --- a/src/AutoConnectPage.cpp +++ b/src/AutoConnectPage.cpp @@ -1371,7 +1371,7 @@ String AutoConnect::_attachMenuItem(const AC_MENUITEM_t item) { PGM_P link; PGM_P label; - switch (static_cast(_apConfig.attachMenu & static_cast(item))) { + switch (static_cast(_apConfig.applyMenu & static_cast(item))) { case AC_MENUITEM_CONFIGNEW: id = PSTR(""); link = PSTR(AUTOCONNECT_URI_CONFIG); @@ -1457,7 +1457,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { elm->addToken(String(FPSTR("CHIP_ID")), std::bind(&AutoConnect::_token_CHIP_ID, this, std::placeholders::_1)); elm->addToken(String(FPSTR("FREE_HEAP")), std::bind(&AutoConnect::_token_FREE_HEAP, this, std::placeholders::_1)); } - else if (uri == String(AUTOCONNECT_URI_CONFIG) && (_apConfig.attachMenu & AC_MENUITEM_CONFIGNEW)) { + else if (uri == String(AUTOCONNECT_URI_CONFIG) && (_apConfig.applyMenu & AC_MENUITEM_CONFIGNEW)) { // Setup /auto/config elm->setMold(_PAGE_CONFIGNEW); @@ -1476,7 +1476,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { elm->addToken(String(FPSTR("HIDDEN_COUNT")), std::bind(&AutoConnect::_token_HIDDEN_COUNT, this, std::placeholders::_1)); elm->addToken(String(FPSTR("CONFIG_IP")), std::bind(&AutoConnect::_token_CONFIG_STAIP, this, std::placeholders::_1)); } - else if (uri == String(AUTOCONNECT_URI_CONNECT) && (_apConfig.attachMenu & AC_MENUITEM_CONFIGNEW || _apConfig.attachMenu & AC_MENUITEM_OPENSSIDS)) { + else if (uri == String(AUTOCONNECT_URI_CONNECT) && (_apConfig.applyMenu & AC_MENUITEM_CONFIGNEW || _apConfig.applyMenu & AC_MENUITEM_OPENSSIDS)) { // Setup /auto/connect _menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_CONNECTING); @@ -1490,7 +1490,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); elm->addToken(String(FPSTR("CUR_SSID")), std::bind(&AutoConnect::_token_CURRENT_SSID, this, std::placeholders::_1)); } - else if (uri == String(AUTOCONNECT_URI_OPEN) && (_apConfig.attachMenu & AC_MENUITEM_OPENSSIDS)) { + else if (uri == String(AUTOCONNECT_URI_OPEN) && (_apConfig.applyMenu & AC_MENUITEM_OPENSSIDS)) { // Setup /auto/open elm->setMold(_PAGE_OPENCREDT); @@ -1504,7 +1504,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); elm->addToken(String(FPSTR("OPEN_SSID")), std::bind(&AutoConnect::_token_OPEN_SSID, this, std::placeholders::_1)); } - else if (uri == String(AUTOCONNECT_URI_DISCON) && (_apConfig.attachMenu & AC_MENUITEM_DISCONNECT)) { + else if (uri == String(AUTOCONNECT_URI_DISCON) && (_apConfig.applyMenu & AC_MENUITEM_DISCONNECT)) { // Setup /auto/disc _menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_DISCONNECT); @@ -1516,7 +1516,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { elm->addToken(String(FPSTR("MENU_PRE")), std::bind(&AutoConnect::_token_MENU_PRE, this, std::placeholders::_1)); elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); } - else if (uri == String(AUTOCONNECT_URI_RESET) && (_apConfig.attachMenu & AC_MENUITEM_RESET)) { + else if (uri == String(AUTOCONNECT_URI_RESET) && (_apConfig.applyMenu & AC_MENUITEM_RESET)) { // Setup /auto/reset elm->setMold(_PAGE_RESETTING);