mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-13 05:46:30 +00:00
- 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
|
#ifdef IR_GC
|
||||||
//ir_gc
|
if (strcmp(str, "gc") == 0 ||strcmp(str, "GC") == 0) { //if first parameter is gc then we process global cache data else it is raw
|
||||||
|
|
||||||
if (strcmp(str, "gc") == 0) { //if first parameter is gc then we process global cache data else it is raw
|
|
||||||
|
|
||||||
uint16_t GC[count+1];
|
uint16_t GC[count+1];
|
||||||
for (uint32_t i = 0; i <= count; i++) {
|
for (uint32_t i = 0; i <= count; i++) {
|
||||||
GC[i] = strtol(strtok_r(nullptr, ", ", &p), nullptr, 0);
|
GC[i] = strtol(strtok_r(nullptr, ", ", &p), nullptr, 0);
|
||||||
if (!GC[i]) {
|
if (!GC[i]) {
|
||||||
return IE_INVALID_RAWDATA;
|
return IE_INVALID_RAWDATA;
|
||||||
}
|
}
|
||||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("DBG: GC value %d"), GC[i]);
|
|
||||||
}
|
}
|
||||||
|
for (uint32_t r = 0; r <= repeat; r++) {
|
||||||
irsend->sendGC(GC, count+1);
|
irsend->sendGC(GC, count+1);
|
||||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("DBG: GC sent count %d"), count);
|
}
|
||||||
return IE_NO_ERROR;
|
return IE_NO_ERROR;
|
||||||
}
|
}
|
||||||
//end ir_gc
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user