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:
parent
0441bbbe72
commit
3504884836
@ -12,7 +12,9 @@
|
||||
#include "inverters/HM_4CH.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#define HOY_SEMAPHORE_TAKE() xSemaphoreTake(_xSemaphore, portMAX_DELAY)
|
||||
#define HOY_SEMAPHORE_TAKE() \
|
||||
do { \
|
||||
} while (xSemaphoreTake(_xSemaphore, portMAX_DELAY) != pdPASS)
|
||||
#define HOY_SEMAPHORE_GIVE() xSemaphoreGive(_xSemaphore)
|
||||
|
||||
HoymilesClass Hoymiles;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user