add repeat function to LORA through mqtt
This commit is contained in:
1 parent
ae43783fd2
commit
e364b37173
2 files changed
+5
No files matched your search
@@ -76,6 +76,10 @@ void LORAtoMQTT(){
|
|||||||
LORAdata.set("packetSize", (int)packetSize);
|
LORAdata.set("packetSize", (int)packetSize);
|
||||||
LORAdata.set("message", (char *)packet.c_str());
|
LORAdata.set("message", (char *)packet.c_str());
|
||||||
pub(subjectLORAtoMQTT,LORAdata);
|
pub(subjectLORAtoMQTT,LORAdata);
|
||||||
|
if (repeatLORAwMQTT){
|
||||||
|
trc(F("Pub LORA for rpt"));
|
||||||
|
pub(subjectMQTTtoLORA,LORAdata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#define LORA_PREAMBLE_LENGTH 8
|
#define LORA_PREAMBLE_LENGTH 8
|
||||||
#define LORA_SYNC_WORD 0x12
|
#define LORA_SYNC_WORD 0x12
|
||||||
|
|
||||||
|
#define repeatLORAwMQTT false // do we repeat a received signal by using mqtt with LORA gateway
|
||||||
|
|
||||||
/*-------------------PIN DEFINITIONS----------------------*/
|
/*-------------------PIN DEFINITIONS----------------------*/
|
||||||
//TTGO LORA BOARD ESP32 PIN DEFINITION
|
//TTGO LORA BOARD ESP32 PIN DEFINITION
|
||||||
|
|||||||
Reference in new issue
Block a user