Fix ir protocol name not correctly displayed on esp8266 (#1129)
This commit is contained in:
1 parent
71d5622a52
commit
665078f5f5
1 file changed
+2
-2
+2
-2
@@ -128,7 +128,8 @@ void IRtoMQTT() {
|
|||||||
# if defined(ESP8266) || defined(ESP32) //resultToHexidecimal is only available with IRremoteESP8266
|
# if defined(ESP8266) || defined(ESP32) //resultToHexidecimal is only available with IRremoteESP8266
|
||||||
String hex = resultToHexidecimal(&results);
|
String hex = resultToHexidecimal(&results);
|
||||||
IRdata["hex"] = (const char*)hex.c_str();
|
IRdata["hex"] = (const char*)hex.c_str();
|
||||||
IRdata["protocol_name"] = (const char*)(typeToString(results.decode_type, false)).c_str();
|
String protocol = typeToString(results.decode_type, false);
|
||||||
|
IRdata["protocol_name"] = (const char*)protocol.c_str();
|
||||||
# endif
|
# endif
|
||||||
String rawCode = "";
|
String rawCode = "";
|
||||||
// Dump data
|
// Dump data
|
||||||
@@ -143,7 +144,6 @@ void IRtoMQTT() {
|
|||||||
if (i < results.rawlen - 1)
|
if (i < results.rawlen - 1)
|
||||||
rawCode = rawCode + ","; // ',' not needed on last one
|
rawCode = rawCode + ","; // ',' not needed on last one
|
||||||
}
|
}
|
||||||
//trc(rawCode);
|
|
||||||
IRdata["raw"] = rawCode;
|
IRdata["raw"] = rawCode;
|
||||||
// if needed we directly resend the raw code
|
// if needed we directly resend the raw code
|
||||||
# ifdef RawDirectForward
|
# ifdef RawDirectForward
|
||||||
|
|||||||
Reference in new issue
Block a user