Added Rules Trigger for WebQueryResponse

This commit is contained in:
Adrian Scillato 2022-04-09 03:44:00 -03:00 committed by GitHub
parent 3432c6841d
commit b35e392e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -3166,12 +3166,14 @@ int WebQuery(char *buffer)
ResponseClear();
char text[2] = { 0 };
text[0] = '.';
Response_P(PSTR("{\"" D_CMND_WEBQUERY "\":"));
while (text[0] != '\0') {
text[0] = *read++;
if (text[0] > 31) { // Remove control characters like linefeed
if (ResponseAppend_P(text) == ResponseSize()) { break; };
}
}
ResponseJsonEnd();
#ifdef USE_SCRIPT
extern uint8_t tasm_cmd_activ;
// recursive call must be possible in this case