From 19c89d9dc832ab405d4a040ed73f69d4cb0f420a Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Wed, 22 Aug 2018 21:23:48 +0200 Subject: [PATCH] Dump mode functionnality adding (#255) Add a new definition of IRrecv with special parameters so as to enable to catch big IR codes --- ZgatewayIR.ino | 6 +++++- config_IR.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ZgatewayIR.ino b/ZgatewayIR.ino index 7a9c11e..7fc9a8c 100644 --- a/ZgatewayIR.ino +++ b/ZgatewayIR.ino @@ -31,7 +31,11 @@ #include #include // Needed if you want to send IR commands. #include // Needed if you want to receive IR commands. - IRrecv irrecv(IR_RECEIVER_PIN); + #ifdef DumpMode // in dump mode we increase the size of the buffer to catch big codes + IRrecv irrecv(IR_RECEIVER_PIN, 1024, 15U, true); + #else + IRrecv irrecv(IR_RECEIVER_PIN); + #endif IRsend irsend(IR_EMITTER_PIN); #else #include diff --git a/config_IR.h b/config_IR.h index 7aff8b9..5a6ce3a 100644 --- a/config_IR.h +++ b/config_IR.h @@ -39,6 +39,7 @@ #define repeatIRwMQTT false // do we repeat a received signal by using mqtt #define RawDirectForward false // direct repeat of IR signal with raw data #define RawFrequency 38 // raw frequency sending +//#define DumpMode true // uncomment so as to see big dumps of IR codes, put also #define MQTT_MAX_PACKET_SIZE 1024 into the library pubsubclient.h by instead of #define MQTT_MAX_PACKET_SIZE 128 #define pubIRunknownPrtcl false // key to avoid mqtt publication of unknown IR protocol (set to true if you want to publish unknown protocol) #define PanasonicAddress 0x4004 // Panasonic address (Pre data)