Merge pull request #3522 from martinez20m/fix_ir_repeat

Fix repeatable action for ir json
This commit is contained in:
Blaž Kristan 2023-11-18 18:29:46 +01:00 committed by GitHub
commit 76a7f25083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -675,7 +675,7 @@ void decodeIRJson(uint32_t code)
} else { } else {
// HTTP API command // HTTP API command
String apireq = "win"; apireq += '&'; // reduce flash string usage String apireq = "win"; apireq += '&'; // reduce flash string usage
if (cmdStr.indexOf("~") || fdo["rpt"]) lastValidCode = code; // repeatable action if (cmdStr.indexOf("~") != -1 || fdo["rpt"]) lastValidCode = code; // repeatable action
if (!cmdStr.startsWith(apireq)) cmdStr = apireq + cmdStr; // if no "win&" prefix if (!cmdStr.startsWith(apireq)) cmdStr = apireq + cmdStr; // if no "win&" prefix
if (!irApplyToAllSelected && cmdStr.indexOf(F("SS="))<0) { if (!irApplyToAllSelected && cmdStr.indexOf(F("SS="))<0) {
char tmp[10]; char tmp[10];