remove string usage for topic comparison

This commit is contained in:
1technophile committed 2019-12-14 11:10:12 +01:00
1 parent 7f16d00a55
commit f7ec81ffaa
13 files changed
+48 -29

No files matched your search

+2 -2
View File
@@ -132,7 +132,7 @@ void MQTTtoRF(char * topicOri, char * datacallback) {
trc(valueBITS);
}
if ((strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoRF).c_str()) != NULL) && (valuePRT == 0) && (valuePLSL == 0) && (valueBITS == 0)){
if ((cmpToMainTopic(topicOri,subjectMQTTtoRF)) && (valuePRT == 0) && (valuePLSL == 0) && (valueBITS == 0)){
trc(F("MQTTtoRF dflt"));
mySwitch.setProtocol(1,350);
mySwitch.send(data, 24);
@@ -156,7 +156,7 @@ void MQTTtoRF(char * topicOri, char * datacallback) {
#ifdef jsonReceiving
void MQTTtoRF(char * topicOri, JsonObject& RFdata) { // json object decoding
if (strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoRF).c_str()) != NULL){
if (cmpToMainTopic(topicOri,subjectMQTTtoRF)){
trc(F("MQTTtoRF json"));
unsigned long data = RFdata["value"];
if (data != 0) {