Publish refactoring (#298)

* factoring of the publishing function
* integration of json publishing to MQTT
* receiving and transcode json messages from mqtt
* replace the TRACE runtime condition by a buildtime one so as to decrease program size
* remove retainFlag parameter not necessary for the moment
* Increase the scope of tests for arduino mega and esp32
* Update arduinojson library to 5.13.3
* add macros to choose between simple or json publishing or both
* differentiate build test for ATmega2560
* correct wrong sprintf definition
* change IDE version for continuous integration
* let default warning level in arduino ide
* correct pins for ESP32
* reorganize user_config
This commit is contained in:
Florian authored and GitHub committed 2018-11-05 22:02:27 +01:00
1 parent f77df7347f
commit d8dba15a81
182 files changed
+2701 -20768

No files matched your search

+7 -5
View File
@@ -28,10 +28,7 @@
// Topic where the message from RFM69 will be published by the gateway,
// appended with the nodeID of the sender
#define subjectRFM69toMQTT Base_Topic Gateway_Name "/RFM69toMQTT"
// Upon reception of a packed, the RSSI of that packet will be publish to this topic,
// appended with the nodeID of the sender
#define subjectRFM69toMQTTrssi Base_Topic Gateway_Name "/RFM69toMQTT/rssi" // Comment this if you don't want the RSSI to be published.
#define subjectRFM69toMQTTsender Base_Topic Gateway_Name "/RFM69toMQTT/sender"
// Topic subscribed by the gateway. Messages received will be sent to RFM69
#define subjectMQTTtoRFM69 Base_Topic Gateway_Name "/commands/MQTTtoRFM69"
#define RFM69receiverKey "RCV_" // receiver id will be defined if a subject contains RFM69receiverKey followed by a value of 3 digits
@@ -55,11 +52,16 @@ const char PROGMEM RFM69AP_NAME[] = "RFM69-AP";
#define POWER_LEVEL 31
/*-------------------PIN DEFINITIONS----------------------*/
#if defined(ESP8266) || defined(ESP32)
#if defined(ESP8266)
#define RFM69_CS D1
#define RFM69_IRQ D8 // GPIO15/D8
#define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ)
#define RFM69_RST D4 // GPIO02/D4
#elif defined(ESP32)
#define RFM69_CS 1
#define RFM69_IRQ 8 // GPIO15/D8
#define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ)
#define RFM69_RST 4 // GPIO02/D4
#else
//RFM69 not tested with arduino
#define RFM69_CS 10