[SYS/BT] Semaphores and new BT Controller (#1819)
Add semaphore to the enqueue calls to avoid concurrency issues Add new BT controller to avoid scan evt timeout bug
This commit is contained in:
1 parent
5421f0e995
commit
eb5b8fa291
45 files changed
+380
-91
No files matched your search
@@ -108,7 +108,7 @@ void createOrUpdateDeviceRTL_433(const char* id, const char* model, uint8_t flag
|
||||
void launchRTL_433Discovery(bool overrideDiscovery) {
|
||||
if (!overrideDiscovery && newRTL_433Devices == 0)
|
||||
return;
|
||||
if (xSemaphoreTake(semaphorecreateOrUpdateDeviceRTL_433, pdMS_TO_TICKS(1000)) == pdFALSE) {
|
||||
if (xSemaphoreTake(semaphorecreateOrUpdateDeviceRTL_433, pdMS_TO_TICKS(QueueSemaphoreTimeOutLoop)) == pdFALSE) {
|
||||
Log.error(F("[rtl_433] semaphorecreateOrUpdateDeviceRTL_433 Semaphore NOT taken" CR));
|
||||
return;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ void rtl_433_Callback(char* message) {
|
||||
storeRTL_433Discovery(RFrtl_433_ESPdata, (char*)model.c_str(), (char*)uniqueid.c_str());
|
||||
# endif
|
||||
RFrtl_433_ESPdata["origin"] = (char*)topic.c_str();
|
||||
enqueueJsonObject(RFrtl_433_ESPdata);
|
||||
handleJsonEnqueue(RFrtl_433_ESPdata);
|
||||
storeSignalValue(MQTTvalue);
|
||||
pubOled((char*)topic.c_str(), RFrtl_433_ESPdata);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user