- generic settings.js handler
- update info
- numeric (not really) hidden PIN
This commit is contained in:
Blaz Kristan
2022-03-02 15:41:31 +01:00
parent 9fd26fa574
commit b339f426f2
9 changed files with 285 additions and 282 deletions

View File

@@ -177,7 +177,7 @@ void getSettingsJS(byte subPage, char* dest)
obuf = dest;
olen = 0;
if (subPage <0 || subPage >8) return;
if (subPage <0 || subPage >9) return;
if (subPage == 0)
{
@@ -630,4 +630,19 @@ void getSettingsJS(byte subPage, char* dest)
oappendi(usermods.getModCount());
oappend(";");
}
if (subPage == 9) // update
{
sappends('m',SET_F("(\"sip\")[0]"),(char*)F("WLED "));
olen -= 2; //delete ";
oappend(versionString);
#ifdef ARDUINO_ARCH_ESP32
oappend(SET_F("<br>(ESP32"));
#else
oappend(SET_F("<br>(ESP8266"));
#endif
oappend(SET_F(" build "));
oappendi(VERSION);
oappend(SET_F(")\";"));
}
}