diff --git a/WiFiManager.cpp b/WiFiManager.cpp index f105a43..b415cf7 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -911,7 +911,8 @@ void WiFiManager::handleInfo() { String page = getHTTPHead(FPSTR(S_titleinfo)); // @token titleinfo reportStatus(page); - #ifdef ESP8266 + //@todo convert to enum + #ifdef ESP8266 String infoids[] = { F("esphead"), F("uptime"), @@ -1084,7 +1085,7 @@ String WiFiManager::getInfoData(String id){ p = FPSTR(HTTP_INFO_lastreset); for(int i=0;i<2;i++){ int reason = rtc_get_reset_reason(i); - String tok = "{"+(String)(i+1)+"}"; + String tok = (String)T_ss+(String)(i+1)+(String)T_es; switch (reason) { //@todo move to array diff --git a/strings_en.h b/strings_en.h index fb25a81..b75ff9d 100644 --- a/strings_en.h +++ b/strings_en.h @@ -184,6 +184,8 @@ const char S_sn[] PROGMEM = "sn"; //Tokens //@todo consolidate and reduce +const char T_ss[] PROGMEM = "{"; // token start sentinel +const char T_es[] PROGMEM = "}"; // token end sentinel const char T_1[] PROGMEM = "{1}"; // @token 1 const char T_2[] PROGMEM = "{2}"; // @token 2 const char T_v[] PROGMEM = "{v}"; // @token v