Merge pull request #8368 from gemu2015/scripter-update

scripter fix
This commit is contained in:
Theo Arends 2020-05-07 09:17:44 +02:00 committed by GitHub
commit 88186946f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -1181,6 +1181,12 @@ chknext:
}
}
}
#ifdef ESP32
if (!strncmp(vname,"core",4)) {
fvar=xPortGetCoreID();
goto exit;
}
#endif
break;
case 'd':
if (!strncmp(vname,"day",3)) {
@ -1705,6 +1711,12 @@ chknext:
fvar=999;
goto exit;
}
#ifdef ESP32
if (!strncmp(vname,"pheap",5)) {
fvar=ESP.getFreePsram();
goto exit;
}
#endif
if (!strncmp(vname,"prefix1",7)) {
if (sp) strlcpy(sp,SettingsText(SET_MQTTPREFIX1),glob_script_mem.max_ssize);
goto strexit;
@ -5235,7 +5247,9 @@ bool Xdrv10(uint8_t function)
break;
#ifdef USE_SCRIPT_WEB_DISPLAY
case FUNC_WEB_ADD_MAIN_BUTTON:
if (bitRead(Settings.rule_enabled, 0)) {
ScriptWebShow('&');
}
break;
#endif // USE_SCRIPT_WEB_DISPLAY
case FUNC_WEB_ADD_HANDLER:

View File

@ -878,13 +878,13 @@ bool Xdrv39(uint8_t function) {
wc_pic_setup();
break;
case FUNC_WEB_ADD_MAIN_BUTTON:
//if (Settings.esp32_webcam_resolution) {
#ifndef USE_SCRIPT
if (Settings.esp32_webcam_resolution) {
//#ifndef USE_SCRIPT
WcStreamControl(Settings.esp32_webcam_resolution);
delay(50); // Give the webcam webserver some time to prepare the stream
wc_show_stream();
#endif
//}
//#endif
}
break;
case FUNC_COMMAND:
result = DecodeCommand(kWCCommands, WCCommand);