Master.cpp: Fixing uninitialised memory.

This commit is contained in:
RedHawk 2023-04-26 00:03:13 +03:00
parent 98e9e11355
commit 34f6b5b694

View File

@ -14,11 +14,11 @@ Master::Master(ThreadCommon::QueueManager* qm) : _qm(qm)
void Master::taskFunction() {
QueueHandle_t master_event_all_q = _qm->getQueue(ThreadCommon::QueueManager::master_event_all);
ThreadCommon::Event* data;
ThreadCommon::Event data(ThreadCommon::Null, 0);
int led = 0;
bool LedState = true;
for (;;) {
xQueueReceive(master_event_all_q, static_cast<void*>(data), portMAX_DELAY);
xQueueReceive(master_event_all_q, static_cast<void*>(&data), portMAX_DELAY);
Board_LED_Set(led, LedState);
LedState = (bool) !LedState;
led++;