From 2b1d251b85de0f6f9af1a67ce277a9850bdcc1be Mon Sep 17 00:00:00 2001 From: Alain Turbide Date: Tue, 23 Jun 2020 19:46:55 -0400 Subject: [PATCH] - Added case insensitivity for GC/gc - Added repeat support - removed debug messages --- tasmota/xdrv_05_irremote_full.ino | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tasmota/xdrv_05_irremote_full.ino b/tasmota/xdrv_05_irremote_full.ino index 3f43c364a..ba132b9be 100644 --- a/tasmota/xdrv_05_irremote_full.ino +++ b/tasmota/xdrv_05_irremote_full.ino @@ -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