diff --git a/src/simplified/xf/port/idf-stm32/eventqueue.cpp b/src/simplified/xf/port/idf-stm32/eventqueue.cpp index 104a095..f345c63 100644 --- a/src/simplified/xf/port/idf-stm32/eventqueue.cpp +++ b/src/simplified/xf/port/idf-stm32/eventqueue.cpp @@ -20,9 +20,10 @@ bool XFEventQueue::empty() const { } bool XFEventQueue::push(const XFEvent *pEvent, bool fromISR) { - if(!fromISR) mutex_.lock(); + (void) fromISR; + mutex_.lock(); queue_.push(pEvent); - if(!fromISR) mutex_.unlock(); + mutex_.unlock(); return true; } @@ -37,8 +38,7 @@ void XFEventQueue::pop() { } -bool XFEventQueue::pend() -{ +bool XFEventQueue::pend() { // Method cannot be used in an IDF! Waiting within // this method would block the whole XF return false; diff --git a/src/simplified/xf/port/idf-stm32/xf.cpp b/src/simplified/xf/port/idf-stm32/xf.cpp index d8b00b6..b596fb1 100644 --- a/src/simplified/xf/port/idf-stm32/xf.cpp +++ b/src/simplified/xf/port/idf-stm32/xf.cpp @@ -43,9 +43,9 @@ int XF::exec(){ } int XF::execOnce() { - int foo; - foo = interface::XFDispatcher::getInstance()->execute(); - return foo; + interface::XFDispatcher::getInstance()->executeOnce(); + isRunning_ = true; + return 0; } bool XF::isRunning() {