mirror of https://github.com/arendst/Tasmota.git
- Added case insensitivity for GC/gc
- Added repeat support - removed debug messages
This commit is contained in:
parent
100805ff26
commit
2b1d251b85
|
@ -472,23 +472,19 @@ uint32_t IrRemoteCmndIrSendRaw(void)
|
|||
|
||||
|
||||
#ifdef IR_GC
|
||||
//ir_gc
|
||||
|
||||
if (strcmp(str, "gc") == 0) { //if first parameter is gc then we process global cache data else it is raw
|
||||
|
||||
if (strcmp(str, "gc") == 0 ||strcmp(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;
|
||||
return IE_INVALID_RAWDATA;
|
||||
}
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("DBG: GC value %d"), GC[i]);
|
||||
}
|
||||
irsend->sendGC(GC, count+1);
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("DBG: GC sent count %d"), count);
|
||||
return IE_NO_ERROR;
|
||||
for (uint32_t r = 0; r <= repeat; r++) {
|
||||
irsend->sendGC(GC, count+1);
|
||||
}
|
||||
return IE_NO_ERROR;
|
||||
}
|
||||
//end ir_gc
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue