Wifi managers improvements (#503)
* Add parameters to wifi manager: gateway name and base topic Enable to restart the ESP and erase the parameters by MQTT
This commit is contained in:
1 parent
a05fd01505
commit
4b1f09b06b
41 files changed
+308
-196
No files matched your search
@@ -87,7 +87,7 @@ void LORAtoMQTT(){
|
||||
|
||||
#ifdef jsonReceiving
|
||||
void MQTTtoLORA(char * topicOri, JsonObject& LORAdata) { // json object decoding
|
||||
if (strcmp(topicOri,subjectMQTTtoLORA) == 0){
|
||||
if (strstr(topicOri,catToMainTopic(subjectMQTTtoLORA)) != 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 (strcmp(topicOri,subjectMQTTtoLORA) == 0){
|
||||
if (strstr(topicOri,catToMainTopic(subjectMQTTtoLORA)) != NULL){
|
||||
LoRa.beginPacket();
|
||||
LoRa.print(LORAdata);
|
||||
LoRa.endPacket();
|
||||
|
||||
Reference in new issue
Block a user