add hexadecimal publication to IRtoMQTT with ESP8266
This commit is contained in:
1 parent
8b0e3eb8b4
commit
8aad413ce3
1 file changed
+4
-1
+4
-1
@@ -106,7 +106,10 @@ void IRtoMQTT(){
|
|||||||
IRdata.set("value", (unsigned long)(results.value));
|
IRdata.set("value", (unsigned long)(results.value));
|
||||||
IRdata.set("protocol", (int)(results.decode_type));
|
IRdata.set("protocol", (int)(results.decode_type));
|
||||||
IRdata.set("bits",(int)(results.bits));
|
IRdata.set("bits",(int)(results.bits));
|
||||||
|
#ifdef ESP8266 //resultToHexidecimal is only available with IRremoteESP8266
|
||||||
|
String hex = resultToHexidecimal(&results);
|
||||||
|
IRdata.set("hex", (char *)hex.c_str());
|
||||||
|
#endif
|
||||||
String rawCode = "";
|
String rawCode = "";
|
||||||
// Dump data
|
// Dump data
|
||||||
for (uint16_t i = 1; i < results.rawlen; i++) {
|
for (uint16_t i = 1; i < results.rawlen; i++) {
|
||||||
|
|||||||
Reference in new issue
Block a user