Create a mutex for UI that will help make it possible to run handlers that update UI elements on seprate threads. its far from perfect but should hold up for now.
15 lines
No EOL
283 B
C++
15 lines
No EOL
283 B
C++
#include "UIBase.hpp"
|
|
#include "LvglMutex.hpp"
|
|
|
|
using namespace UI;
|
|
|
|
UIBase::UIBase(std::shared_ptr<HardwareAbstract> aHardware)
|
|
: mHardware(aHardware) {}
|
|
|
|
void UIBase::loopHandler() {
|
|
lv_timer_handler();
|
|
{
|
|
auto lock = LvglMutex::lockScope();
|
|
lv_task_handler();
|
|
}
|
|
} |