diff --git a/main/ZgatewayIR.ino b/main/ZgatewayIR.ino index ee2623e..ed71060 100644 --- a/main/ZgatewayIR.ino +++ b/main/ZgatewayIR.ino @@ -207,7 +207,7 @@ void MQTTtoIR(char* topicOri, JsonObject& IRdata) { } } # ifdef IR_GC - if (strcmp(protocol_name, "GC") == 1) { // sending GC data from https://irdb.globalcache.com + if (strcmp(protocol_name, "GC") == 0) { // sending GC data from https://irdb.globalcache.com Log.trace(F("GC" CR)); //buffer allocation from char datacallback uint16_t GC[count + 1]; @@ -228,7 +228,7 @@ void MQTTtoIR(char* topicOri, JsonObject& IRdata) { } # endif # ifdef IR_RAW - if (strcmp(protocol_name, "Raw") == 1) { // sending Raw data + if (strcmp(protocol_name, "Raw") == 0) { // sending Raw data Log.trace(F("Raw" CR)); //buffer allocation from char datacallback # if defined(ESP8266) || defined(ESP32) @@ -257,7 +257,7 @@ void MQTTtoIR(char* topicOri, JsonObject& IRdata) { signalSent = sendIdentifiedProtocol(protocol_name, data, hex, valueBITS, valueRPT); } else { Log.trace(F("Using NEC protocol" CR)); - Log.notice(F("Sending IR signal with %s"), protocol_name); + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = NEC_BITS; # if defined(ESP8266) || defined(ESP32) @@ -294,8 +294,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } } # ifdef IR_WHYNTER - if (strcmp(protocol_name, "WHYNTER") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "WHYNTER") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = WHYNTER_BITS; # if defined(ESP8266) || defined(ESP32) @@ -308,8 +308,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_LG - if (strcmp(protocol_name, "LG") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "LG") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = LG_BITS; # if defined(ESP8266) || defined(ESP32) @@ -322,8 +322,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SONY - if (strcmp(protocol_name, "SONY") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SONY") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = SONY_12_BITS; # if defined(ESP8266) || defined(ESP32) @@ -336,8 +336,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DISH - if (strcmp(protocol_name, "DISH") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DISH") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = DISH_BITS; # if defined(ESP8266) || defined(ESP32) @@ -350,8 +350,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_RC5 - if (strcmp(protocol_name, "RC5") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "RC5") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = RC5_BITS; # if defined(ESP8266) || defined(ESP32) @@ -364,8 +364,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_RC6 - if (strcmp(protocol_name, "RC6") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "RC6") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = RC6_MODE0_BITS; # if defined(ESP8266) || defined(ESP32) @@ -378,8 +378,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SHARP - if (strcmp(protocol_name, "SHARP") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SHARP") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = SHARP_BITS; # if defined(ESP8266) || defined(ESP32) @@ -392,8 +392,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SAMSUNG - if (strcmp(protocol_name, "SAMSUNG") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SAMSUNG") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = SAMSUNG_BITS; # if defined(ESP8266) || defined(ESP32) @@ -406,8 +406,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_JVC - if (strcmp(protocol_name, "JVC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "JVC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = JVC_BITS; # if defined(ESP8266) || defined(ESP32) @@ -420,9 +420,9 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_PANASONIC - if (strcmp(protocol_name, "PANASONIC") == 1) { + if (strcmp(protocol_name, "PANASONIC") == 0) { # if defined(ESP8266) || defined(ESP32) - Log.notice(F("Sending IR signal with %s"), protocol_name); + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = PANASONIC_BITS; irsend.sendPanasonic(PanasonicAddress, data, valueBITS, valueRPT); @@ -436,9 +436,9 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, # if defined(ESP8266) || defined(ESP32) # ifdef IR_COOLIX - if (strcmp(protocol_name, "COOLIX") == 1) { + if (strcmp(protocol_name, "COOLIX") == 0) { Log.trace(F("Sending %s:" CR), protocol_name); - Log.notice(F("Sending IR signal with %s"), protocol_name); + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kCoolixBits; if (valueRPT == repeatIRwNumber) @@ -448,9 +448,9 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_RCMM - if (strcmp(protocol_name, "RCMM") == 1) { + if (strcmp(protocol_name, "RCMM") == 0) { Log.trace(F("Sending %s:" CR), protocol_name); - Log.notice(F("Sending IR signal with %s"), protocol_name); + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kRCMMBits; irsend.sendRCMM(data, valueBITS, valueRPT); @@ -458,8 +458,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DENON - if (strcmp(protocol_name, "DENON") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DENON") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = DENON_BITS; irsend.sendDenon(data, valueBITS, valueRPT); @@ -467,8 +467,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_GICABLE - if (strcmp(protocol_name, "GICABLE") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "GICABLE") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kGicableBits; if (valueRPT == repeatIRwNumber) @@ -478,8 +478,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SHERWOOD - if (strcmp(protocol_name, "SHERWOOD") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SHERWOOD") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kSherwoodBits; if (valueRPT == repeatIRwNumber) @@ -489,8 +489,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHI - if (strcmp(protocol_name, "MITSUBISHI") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHI") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishiBits; if (valueRPT == repeatIRwNumber) @@ -500,8 +500,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_NIKAI - if (strcmp(protocol_name, "NIKAI") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "NIKAI") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kNikaiBits; irsend.sendNikai(data, valueBITS, valueRPT); @@ -509,8 +509,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MIDEA - if (strcmp(protocol_name, "MIDEA") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MIDEA") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMideaBits; if (valueRPT == repeatIRwNumber) @@ -520,8 +520,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MAGIQUEST - if (strcmp(protocol_name, "MAGIQUEST") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MAGIQUEST") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMagiquestBits; irsend.sendMagiQuest(data, valueBITS, valueRPT); @@ -529,8 +529,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_LASERTAG - if (strcmp(protocol_name, "LASERTAG") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "LASERTAG") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kLasertagBits; if (valueRPT == repeatIRwNumber) @@ -540,8 +540,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_CARRIER_AC - if (strcmp(protocol_name, "CARRIER_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "CARRIER_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kCarrierAcBits; if (valueRPT == repeatIRwNumber) @@ -551,8 +551,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHI2 - if (strcmp(protocol_name, "MITSUBISHI2") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHI2") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishiBits; if (valueRPT == repeatIRwNumber) @@ -562,8 +562,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_AIWA_RC_T501 - if (strcmp(protocol_name, "AIWA_RC_T501") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "AIWA_RC_T501") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kAiwaRcT501Bits; if (valueRPT == repeatIRwNumber) @@ -573,8 +573,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN - if (strcmp(protocol_name, "DAIKIN") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikinStateLength; if (valueRPT == repeatIRwNumber) @@ -584,8 +584,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_KELVINATOR - if (strcmp(protocol_name, "KELVINATOR") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "KELVINATOR") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kKelvinatorStateLength; if (valueRPT == repeatIRwNumber) @@ -595,8 +595,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHI_AC - if (strcmp(protocol_name, "MITSUBISHI_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHI_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishiACStateLength; if (valueRPT == repeatIRwNumber) @@ -606,8 +606,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SANYO - if (strcmp(protocol_name, "SANYOLC7461") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SANYOLC7461") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kSanyoLC7461Bits; irsend.sendSanyoLC7461(data, valueBITS, valueRPT); @@ -615,8 +615,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_GREE - if (strcmp(protocol_name, "GREE") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "GREE") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kGreeStateLength; if (valueRPT == repeatIRwNumber) @@ -626,8 +626,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_ARGO - if (strcmp(protocol_name, "ARGO") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "ARGO") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kArgoStateLength; if (valueRPT == repeatIRwNumber) @@ -637,8 +637,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_TROTEC - if (strcmp(protocol_name, "TROTEC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "TROTEC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kTrotecStateLength; if (valueRPT == repeatIRwNumber) @@ -648,8 +648,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_TOSHIBA_AC - if (strcmp(protocol_name, "TOSHIBA_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "TOSHIBA_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kToshibaACBits; if (valueRPT == repeatIRwNumber) @@ -659,7 +659,7 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_FUJITSU_AC - if (strcmp(protocol_name, "FUJITSU_AC") == 1) { + if (strcmp(protocol_name, "FUJITSU_AC") == 0) { if (valueRPT == repeatIRwNumber) valueRPT = std::max(valueRPT, kFujitsuAcMinRepeat); irsend.sendFujitsuAC(dataarray, valueBITS, valueRPT); @@ -667,8 +667,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HAIER_AC - if (strcmp(protocol_name, "HAIER_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HAIER_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHaierACStateLength; if (valueRPT == repeatIRwNumber) @@ -678,8 +678,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HITACHI_AC - if (strcmp(protocol_name, "HITACHI_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HITACHI_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHitachiAcStateLength; if (valueRPT == repeatIRwNumber) @@ -689,8 +689,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HITACHI_AC1 - if (strcmp(protocol_name, "HITACHI_AC1") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HITACHI_AC1") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHitachiAc1StateLength; if (valueRPT == repeatIRwNumber) @@ -700,8 +700,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HITACHI_AC2 - if (strcmp(protocol_name, "HITACHI_AC2") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HITACHI_AC2") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHitachiAc2StateLength; if (valueRPT == repeatIRwNumber) @@ -711,8 +711,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HAIER_AC_YRW02 - if (strcmp(protocol_name, "HAIER_AC_YRW02") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HAIER_AC_YRW02") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHaierACYRW02StateLength; if (valueRPT == repeatIRwNumber) @@ -722,8 +722,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_WHIRLPOOL_AC - if (strcmp(protocol_name, "WHIRLPOOL_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "WHIRLPOOL_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kWhirlpoolAcStateLength; if (valueRPT == repeatIRwNumber) @@ -733,8 +733,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SAMSUNG_AC - if (strcmp(protocol_name, "SAMSUNG_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SAMSUNG_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kSamsungAcStateLength; if (valueRPT == repeatIRwNumber) @@ -744,8 +744,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_LUTRON - if (strcmp(protocol_name, "LUTRON") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "LUTRON") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kLutronBits; irsend.sendLutron(data, valueBITS, valueRPT); @@ -753,8 +753,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_ELECTRA_AC - if (strcmp(protocol_name, "ELECTRA_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "ELECTRA_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kElectraAcStateLength; irsend.sendElectraAC(dataarray, valueBITS, valueRPT); @@ -762,8 +762,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_PANASONIC_AC - if (strcmp(protocol_name, "PANASONIC_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "PANASONIC_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kPanasonicAcStateLength; if (valueRPT == repeatIRwNumber) @@ -773,8 +773,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_PIONEER - if (strcmp(protocol_name, "PIONEER") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "PIONEER") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kPioneerBits; irsend.sendPioneer(data, valueBITS, valueRPT); @@ -782,8 +782,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_LG2 - if (strcmp(protocol_name, "LG2") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "LG2") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kLgBits; irsend.sendLG2(data, valueBITS, valueRPT); @@ -791,14 +791,14 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MWM - if (strcmp(protocol_name, "MWM") == 1) { + if (strcmp(protocol_name, "MWM") == 0) { irsend.sendMWM(dataarray, valueBITS, valueRPT); return true; } # endif # ifdef IR_DAIKIN2 - if (strcmp(protocol_name, "DAIKIN2") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN2") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin2StateLength; if (valueRPT == repeatIRwNumber) @@ -808,8 +808,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_VESTEL_AC - if (strcmp(protocol_name, "VESTEL_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "VESTEL_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kVestelAcBits; irsend.sendVestelAc(data, valueBITS, valueRPT); @@ -817,8 +817,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SAMSUNG36 - if (strcmp(protocol_name, "SAMSUNG36") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SAMSUNG36") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kSamsung36Bits; irsend.sendSamsung36(data, valueBITS, valueRPT); @@ -826,8 +826,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_TCL112AC - if (strcmp(protocol_name, "TCL112AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "TCL112AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kTcl112AcStateLength; if (valueRPT == repeatIRwNumber) @@ -837,8 +837,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_TECO - if (strcmp(protocol_name, "TECO") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "TECO") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kTecoBits; irsend.sendTeco(data, valueBITS, valueRPT); @@ -846,8 +846,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_LEGOPF - if (strcmp(protocol_name, "LEGOPF") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "LEGOPF") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kLegoPfBits; if (valueRPT == repeatIRwNumber) @@ -857,8 +857,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHIHEAVY88 - if (strcmp(protocol_name, "MITSUBISHIHEAVY88") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHIHEAVY88") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishiHeavy88StateLength; if (valueRPT == repeatIRwNumber) @@ -868,8 +868,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHIHEAVY152 - if (strcmp(protocol_name, "MITSUBISHIHEAVY152") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHIHEAVY152") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishiHeavy152StateLength; if (valueRPT == repeatIRwNumber) @@ -879,8 +879,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN216 - if (strcmp(protocol_name, "DAIKIN216") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN216") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin216StateLength; if (valueRPT == repeatIRwNumber) @@ -890,8 +890,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_SHARP_AC - if (strcmp(protocol_name, "SHARP_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "SHARP_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kSharpAcStateLength; if (valueRPT == repeatIRwNumber) @@ -901,8 +901,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_GOODWEATHER - if (strcmp(protocol_name, "GOODWEATHER_AC") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "GOODWEATHER_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kGoodweatherBits; if (valueRPT == repeatIRwNumber) @@ -912,8 +912,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_INAX - if (strcmp(protocol_name, "INAX") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "INAX") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kInaxBits; if (valueRPT == repeatIRwNumber) @@ -923,8 +923,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN160 - if (strcmp(protocol_name, "DAIKIN160") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN160") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin160StateLength; if (valueRPT == repeatIRwNumber) @@ -934,8 +934,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_NEOCLIMA - if (strcmp(protocol_name, "NEOCLIMA") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "NEOCLIMA") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kNeoclimaStateLength; if (valueRPT == repeatIRwNumber) @@ -945,8 +945,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN176 - if (strcmp(protocol_name, "DAIKIN176") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN176") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin176StateLength; if (valueRPT == repeatIRwNumber) @@ -956,8 +956,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN128 - if (strcmp(protocol_name, "DAIKIN128") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN128") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin128StateLength; if (valueRPT == repeatIRwNumber) @@ -967,8 +967,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_AMCOR - if (strcmp(protocol_name, "AMCOR") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "AMCOR") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kAmcorStateLength; if (valueRPT == repeatIRwNumber) @@ -978,8 +978,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_DAIKIN152 - if (strcmp(protocol_name, "DAIKIN152") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "DAIKIN152") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kDaikin152StateLength; if (valueRPT == repeatIRwNumber) @@ -989,8 +989,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHI136 - if (strcmp(protocol_name, "MITSUBISHI136") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHI136") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishi136StateLength; if (valueRPT == repeatIRwNumber) @@ -1000,8 +1000,8 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_MITSUBISHI112 - if (strcmp(protocol_name, "MITSUBISHI112") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "MITSUBISHI112") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kMitsubishi112StateLength; if (valueRPT == repeatIRwNumber) @@ -1011,9 +1011,9 @@ bool sendIdentifiedProtocol(const char* protocol_name, unsigned long long data, } # endif # ifdef IR_HITACHI_AC424 - if (strcmp(protocol_name, "HITACHI_AC424") == 1) { - Log.notice(F("Sending IR signal with %s"), protocol_name); - Log.notice(F("Sending IR signal with %s"), protocol_name); + if (strcmp(protocol_name, "HITACHI_AC424") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + Log.notice(F("Sending IR signal with %s" CR), protocol_name); if (valueBITS == 0) valueBITS = kHitachiAc424StateLength; if (valueRPT == repeatIRwNumber)