BT lockless queue (#867)
* Lockless json queue for ESP32 BT to avoid SYStoMQTT concurrency issue * BT haRoomPresence handle with lockless queue
This commit is contained in:
1 parent
4431af462f
commit
1b7f83c014
3 files changed
+201
-60
No files matched your search
@@ -30,6 +30,12 @@ extern void setupBT();
|
||||
extern bool BTtoMQTT();
|
||||
extern void MQTTtoBT(char* topicOri, JsonObject& RFdata);
|
||||
|
||||
#ifdef ESP32
|
||||
extern int btQueueBlocked;
|
||||
extern int btQueueLengthSum;
|
||||
extern int btQueueLengthCount;
|
||||
#endif
|
||||
|
||||
/*----------------------BT topics & parameters-------------------------*/
|
||||
#define subjectBTtoMQTT "/BTtoMQTT"
|
||||
#define subjectMQTTtoBTset "/commands/MQTTtoBT/config"
|
||||
@@ -48,6 +54,10 @@ extern void MQTTtoBT(char* topicOri, JsonObject& RFdata);
|
||||
# define PublishOnlySensors false //false if we publish all BLE devices discovered or true only the identified sensors (like temperature sensors)
|
||||
#endif
|
||||
|
||||
#ifndef BTQueueSize
|
||||
# define BTQueueSize 4 // lockless queue size for multi core cases (ESP32 currently)
|
||||
#endif
|
||||
|
||||
#define HMSerialSpeed 9600 // Communication speed with the HM module, softwareserial doesn't support 115200
|
||||
//#define HM_BLUE_LED_STOP true //uncomment to stop the blue led light of HM1X
|
||||
|
||||
|
||||
Reference in new issue
Block a user