Fix USE_SCRIPT_WEB_DISPLAY error

Fix USE_SCRIPT_WEB_DISPLAY error (#7021)
This commit is contained in:
Theo Arends 2019-11-25 17:21:31 +01:00
parent a76a79a413
commit 150b26faf8
1 changed files with 5 additions and 3 deletions

View File

@ -130,7 +130,7 @@ const char HTTP_SCRIPT_ROOT[] PROGMEM =
"clearTimeout(lt);" "clearTimeout(lt);"
"rfsh=0;" "rfsh=0;"
"}" "}"
"}" "}";
#else // USE_SCRIPT_WEB_DISPLAY #else // USE_SCRIPT_WEB_DISPLAY
"function la(p){" "function la(p){"
"var a='';" "var a='';"
@ -149,9 +149,10 @@ const char HTTP_SCRIPT_ROOT[] PROGMEM =
"x.open('GET','.?m=1'+a,true);" // ?m related to WebServer->hasArg("m") "x.open('GET','.?m=1'+a,true);" // ?m related to WebServer->hasArg("m")
"x.send();" "x.send();"
"lt=setTimeout(la,%d);" // Settings.web_refresh "lt=setTimeout(la,%d);" // Settings.web_refresh
"}" "}";
#endif // USE_SCRIPT_WEB_DISPLAY #endif // USE_SCRIPT_WEB_DISPLAY
const char HTTP_SCRIPT_ROOT_PART2[] PROGMEM =
"function lc(v,i,p){" "function lc(v,i,p){"
"if(v=='h'||v=='d'){" // Hue or Brightness changed so change Saturation colors too "if(v=='h'||v=='d'){" // Hue or Brightness changed so change Saturation colors too
"var sl=eb('sl4').value;" "var sl=eb('sl4').value;"
@ -159,7 +160,6 @@ const char HTTP_SCRIPT_ROOT[] PROGMEM =
"}" "}"
"la('&'+v+i+'='+p);" "la('&'+v+i+'='+p);"
"}" "}"
"wl(la);"; "wl(la);";
const char HTTP_SCRIPT_WIFI[] PROGMEM = const char HTTP_SCRIPT_WIFI[] PROGMEM =
@ -990,6 +990,8 @@ void HandleRoot(void)
#else #else
WSContentSend_P(HTTP_SCRIPT_ROOT, Settings.web_refresh); WSContentSend_P(HTTP_SCRIPT_ROOT, Settings.web_refresh);
#endif #endif
WSContentSend_P(HTTP_SCRIPT_ROOT_PART2);
WSContentSendStyle(); WSContentSendStyle();
WSContentSend_P(PSTR("<div id='l1' name='l1'></div>")); WSContentSend_P(PSTR("<div id='l1' name='l1'></div>"));