mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-03-26 19:09:03 +01:00
Fix: xSemaphoreTake was useless
There was no check of the return value implemented therefore xSemaphoreTake was just executed and not locked
This commit is contained in:
@@ -8,7 +8,9 @@
|
||||
|
||||
MessageOutputClass MessageOutput;
|
||||
|
||||
#define MSG_LOCK() xSemaphoreTake(_lock, portMAX_DELAY)
|
||||
#define MSG_LOCK() \
|
||||
do { \
|
||||
} while (xSemaphoreTake(_lock, portMAX_DELAY) != pdPASS)
|
||||
#define MSG_UNLOCK() xSemaphoreGive(_lock)
|
||||
|
||||
MessageOutputClass::MessageOutputClass()
|
||||
@@ -45,7 +47,7 @@ void MessageOutputClass::loop()
|
||||
_ws->textAll(_buffer, _buff_pos);
|
||||
_buff_pos = 0;
|
||||
}
|
||||
if(_forceSend) {
|
||||
if (_forceSend) {
|
||||
_buff_pos = 0;
|
||||
}
|
||||
MSG_UNLOCK();
|
||||
|
||||
Reference in New Issue
Block a user