From 411550d8ceaaafcb7cb023189df5d9d38c99fdad Mon Sep 17 00:00:00 2001 From: 1technophile Date: Sat, 6 May 2017 23:07:55 +0200 Subject: [PATCH] rename globalcache IR send to GC instead of raw --- OpenMQTTGateway.ino | 2 -- ZgatewayIR.ino | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index b199d6c..e143061 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -22,8 +22,6 @@ - ekim from Home assistant forum - ronvl from Home assistant forum -IMPORTANT NOTE: On arduino connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote/IRremoteInt.h so as to free pin D3 for RF RECEIVER PIN - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, diff --git a/ZgatewayIR.ino b/ZgatewayIR.ino index 4a3cb35..b14ef5f 100644 --- a/ZgatewayIR.ino +++ b/ZgatewayIR.ino @@ -93,8 +93,9 @@ void MQTTtoIR(char * topicOri, char * datacallback) { if(count == 0){ data = strtoul(datacallback, NULL, 10); // standard sending with unsigned long, we will not be able to pass values > 4294967295 } - else if(strstr(topicOri, "IR_Raw") != NULL){ // sending raw data from https://irdb.globalcache.com - trc("IR_Raw"); + #ifdef IR_GC + else if(strstr(topicOri, "IR_GC") != NULL){ // sending GC data from https://irdb.globalcache.com + trc("IR_GC"); //buffer allocation from char datacallback unsigned int GC[count+1]; String value = ""; @@ -111,12 +112,11 @@ void MQTTtoIR(char * topicOri, char * datacallback) { j++; } } - #ifdef IR_Raw irsend.sendGC(GC, j); signalSent = true; - #endif } - +#endif + //We look into the subject to see if a special Bits number is defined String topic = topicOri; int valueRPT = 0;