Publishing/receiving inconsistencies fix (#1229)

* Publishing/receiving inconsistencies

* General platformio.ini changes

General platformio.ini changes to allow for publishing/receiving settings to be defined in User_cofig.h instead of them only working if defined in the environments. Kept separate so far for discussion.
This commit is contained in:
DigiH authored and GitHub committed 2022-07-01 07:17:02 -05:00
1 parent 3bd1d31fcc
commit a388f14e75
15 files changed
+39 -40

No files matched your search

+4 -4
View File
@@ -328,12 +328,12 @@ void pub(const char* topicori, JsonObject& data) {
# endif
#endif
#ifdef jsonPublishing
#if jsonPublishing
Log.trace(F("jsonPubl - ON" CR));
pubMQTT(topic, dataAsString.c_str());
#endif
#ifdef simplePublishing
#if simplePublishing
Log.trace(F("simplePub - ON" CR));
// Loop through all the key-value pairs in obj
for (JsonPair p : data) {
@@ -1696,7 +1696,7 @@ void receivingMQTT(char* topicOri, char* datacallback) {
#ifdef ZgatewayRTL_433 // ZgatewayRTL_433 is only defined with json publishing due to its numerous parameters
MQTTtoRTL_433(topicOri, jsondata);
#endif
#ifdef jsonReceiving
#if jsonReceiving
# ifdef ZgatewayLORA
MQTTtoLORA(topicOri, jsondata);
# endif
@@ -1747,7 +1747,7 @@ void receivingMQTT(char* topicOri, char* datacallback) {
MQTTtoSYS(topicOri, jsondata);
} else { // not a json object --> simple decoding
#ifdef simpleReceiving
#if simpleReceiving
# ifdef ZgatewayLORA
MQTTtoLORA(topicOri, datacallback);
# endif