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
@@ -87,7 +87,7 @@ void LORAtoMQTT(){
#ifdef jsonReceiving
void MQTTtoLORA(char * topicOri, JsonObject& LORAdata) { // json object decoding
if (strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoLORA).c_str()) != NULL){
if (cmpToMainTopic(topicOri,subjectMQTTtoLORA)){
trc(F("MQTTtoLORA json"));
const char * message = LORAdata["message"];
int txPower = LORAdata["txpower"]|LORA_TX_POWER;
@@ -120,7 +120,7 @@ void LORAtoMQTT(){
#endif
#ifdef simpleReceiving
void MQTTtoLORA(char * topicOri, char * LORAdata) { // json object decoding
if (strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoLORA).c_str()) != NULL){
if (cmpToMainTopic(topicOri,subjectMQTTtoLORA)){
LoRa.beginPacket();
LoRa.print(LORAdata);
LoRa.endPacket();