Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r1ec7b44e6d1d66460d2da943ff65f3c0c0755d8f -r805119c460b4a266d6401c8705f4427e7fbe270f --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 1ec7b44e6d1d66460d2da943ff65f3c0c0755d8f) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 805119c460b4a266d6401c8705f4427e7fbe270f) @@ -73,8 +73,11 @@ */ void MessageDispatcher::quit() { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. quitThread(); } +// coco end /*! * \brief Message Handler connections definition @@ -125,11 +128,15 @@ */ void MessageDispatcher::quitThread() { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. + if ( ! _thread ) return; // runs in thread moveToThread(qApp->thread()); } +// coco end /*! * \brief MessageDispatcher::onFrameReceive @@ -157,11 +164,11 @@ // TODO : must be moved to a MessageModel class if (mMessage.isComplete()) { rxCount(); - #ifdef QT_DEBUG - if (_rxSequence != mMessage.sequence) { - qDebug() << tr("Out of Sync : %1 , %2").arg(_rxSequence).arg(mMessage.sequence); - } - #endif + //#ifdef QT_DEBUG + // if (_rxSequence != mMessage.sequence) { + // qDebug() << tr("Out of Sync : %1 , %2").arg(_rxSequence).arg(mMessage.sequence); + // } + //#endif interpretMessage(mMessage); } } @@ -212,7 +219,7 @@ if (vSequence == 0) { // initialize // it's obvious that this assignment does not effect outside of the function. // but is make it easier to just assume the correct value has been passed - // and still using the function parameter as a local variable. + // and still using the same variable (function parameter) as a local variable. vSequence = _txSequence; } @@ -362,14 +369,5 @@ */ bool MessageDispatcher::needsAcknow(GuiActionType vActionId) { - switch(vActionId) { - case GuiActionType::Acknow: - return false; - default: -#ifdef DEBUG_ACKBACK_HD_TO_UI - return true; -#else - return false; -#endif - } + return _needsAcknow.contains(vActionId); }