Change topics concatenation method
Correct regression introduced by #503 Nevertheless this method needs to be optimized to avoid the use of string.
This commit is contained in:
1 parent
c0ddf77c9f
commit
7f16d00a55
12 files changed
+23
-23
No files matched your search
@@ -87,7 +87,7 @@ void LORAtoMQTT(){
|
||||
|
||||
#ifdef jsonReceiving
|
||||
void MQTTtoLORA(char * topicOri, JsonObject& LORAdata) { // json object decoding
|
||||
if (strstr(topicOri,catToMainTopic(subjectMQTTtoLORA)) != NULL){
|
||||
if (strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoLORA).c_str()) != NULL){
|
||||
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,catToMainTopic(subjectMQTTtoLORA)) != NULL){
|
||||
if (strstr(topicOri,(char *)catToMainTopic(subjectMQTTtoLORA).c_str()) != NULL){
|
||||
LoRa.beginPacket();
|
||||
LoRa.print(LORAdata);
|
||||
LoRa.endPacket();
|
||||
|
||||
Reference in new issue
Block a user