[SYS] Implement a central queue (#1767)

to avoid concurrency issues when modules or/and gateways want to publish data
This commit is contained in:
Florian authored and GitHub committed 2023-11-08 07:26:21 -06:00
1 parent ca9ef664ab
commit 029409c0c3
39 files changed
+491 -407

No files matched your search

+1 -10
View File
@@ -29,16 +29,13 @@
extern void setupBT();
extern bool BTtoMQTT();
extern void MQTTtoBT(char* topicOri, JsonObject& RFdata);
extern void emptyBTQueue();
extern void pubMainCore(JsonObject& data);
extern void launchBTDiscovery(bool overrideDiscovery);
extern void stopProcessing();
extern void lowPowerESP32();
extern String stateBTMeasures(bool);
#ifdef ESP32
extern int btQueueBlocked;
extern int btQueueLengthSum;
extern int btQueueLengthCount;
# include "NimBLEDevice.h"
#endif
@@ -119,10 +116,6 @@ extern int btQueueLengthCount;
# define HassPresence false //false if we publish into Home Assistant presence topic
#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
@@ -236,6 +229,4 @@ public:
};
};
JsonObject& getBTJsonObject(const char* json = NULL, bool haPresenceEnabled = true);
#endif