Menu & UI: [#25, #35]Communication between these tasks.

* The code is a mess for now. I'm not sure if there is any reason to
send a whole event to UI, it's better to send InterfaceWithData.
* Sending to queue from Menu isn't great as well.
This commit is contained in:
RedHawk
2023-05-08 16:08:34 +03:00
parent cd84528e61
commit f0bbfb22ab
6 changed files with 16 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ void UserInterface::taskFunction()
for (;;)
{
this->_qm->receive(ThreadCommon::QueueManager::ui_event_manager, &data, portMAX_DELAY);
this->_qm->receive<Event>(ThreadCommon::QueueManager::ui_event_manager, &data, portMAX_DELAY);
//Don't mind the type, we care only about the raw_data.
EventRawData ed = data.getDataOf(Event::NotifyUI);
if(ed != ERROR_RETURN)

View File

@@ -23,7 +23,7 @@ public:
union InterfaceData
{
char str[64];
const char str[64];
};
struct InterfaceWithData