mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Merge pull request #8771 from Dilbert66/gc
Add support for sending GlobalCache codes via irsend
This commit is contained in:
commit
81d2527ff6
@ -470,6 +470,21 @@ uint32_t IrRemoteCmndIrSendRaw(void)
|
||||
return IE_INVALID_RAWDATA;
|
||||
} // Parameters must be at least 3
|
||||
|
||||
if (strcasecmp(str, "gc") == 0) { //if first parameter is gc then we process global cache data else it is raw
|
||||
uint16_t GC[count+1];
|
||||
for (uint32_t i = 0; i <= count; i++) {
|
||||
GC[i] = strtol(strtok_r(nullptr, ", ", &p), nullptr, 0);
|
||||
if (!GC[i]) {
|
||||
return IE_INVALID_RAWDATA;
|
||||
}
|
||||
}
|
||||
irsend_active = true;
|
||||
for (uint32_t r = 0; r <= repeat; r++) {
|
||||
irsend->sendGC(GC, count+1);
|
||||
}
|
||||
return IE_NO_ERROR;
|
||||
}
|
||||
|
||||
uint16_t parm[count];
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
parm[i] = strtol(strtok_r(nullptr, ", ", &p), nullptr, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user