Skip to content

Commit

Permalink
Fix ir protocol name not correctly displayed on esp8266 (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile authored Jan 14, 2022
1 parent 71d5622 commit 665078f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/ZgatewayIR.ino
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ void IRtoMQTT() {
# if defined(ESP8266) || defined(ESP32) //resultToHexidecimal is only available with IRremoteESP8266
String hex = resultToHexidecimal(&results);
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
String rawCode = "";
// Dump data
Expand All @@ -143,7 +144,6 @@ void IRtoMQTT() {
if (i < results.rawlen - 1)
rawCode = rawCode + ","; // ',' not needed on last one
}
//trc(rawCode);
IRdata["raw"] = rawCode;
// if needed we directly resend the raw code
# ifdef RawDirectForward
Expand Down

0 comments on commit 665078f

Please sign in to comment.