Index: sources/canbus/caninterface.cpp =================================================================== diff -u -r057d3ef4e29c63235040c5cfe8c6421ef7787d6a -reea63d68fc0fb269f8dec64d99f488bcad117220 --- sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision 057d3ef4e29c63235040c5cfe8c6421ef7787d6a) +++ sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision eea63d68fc0fb269f8dec64d99f488bcad117220) @@ -82,7 +82,7 @@ { // coco begin validated: Application termination is not correctly done in coco!!! // it has been tested and works perfectly fine in normal run. - quitThread(); + quitThread(); // verified } // coco end @@ -131,7 +131,7 @@ _thread = &vThread; _thread->setObjectName(QString("%1_Thread").arg(metaObject()->className())); connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(quit())); - _thread->start(); + if (!_thread->isRunning()) _thread->start(); // In case more than one object using the same thread moveToThread(_thread); } @@ -148,7 +148,7 @@ if (! _thread) return; // runs in thread - moveToThread(qApp->thread()); + moveToThread(qApp->thread()); // verified } // coco end @@ -244,6 +244,7 @@ */ void CanInterface::consoleOut(const QCanBusFrame &vFrame, const QString &vFrameCount) { + // coco begin validated: This code is only for debugging purposes and had been tested manually. if ( ! _enableConsoleOut ) return; LOG_EVENT_ONCE(QObject::tr("console out CanInterface Enabled")); @@ -261,6 +262,7 @@ } fprintf(stderr, "%s %s %s %i %s\n", vFrameCount.toLatin1().constData(), time.toLatin1().constData(), flags.toLatin1().constData(), vFrame.frameId(), view.toLatin1().constData()); } +// coco end /*! * \brief CanInterface::rxCount @@ -366,8 +368,10 @@ while (_canDevice->framesAvailable()) { const QCanBusFrame frame = _canDevice->readFrame(); rxCount(); + // coco begin validated: This code is only for debugging purposes and had been tested manually. if ( _enableConsoleOut ) consoleOut(frame, QString("Rx:%1").arg(_rxFrameCount)); + // coco end emit didFrameReceive(frame); } } @@ -382,7 +386,9 @@ { bool ok = transmit(vFrame); txCount(); + // coco begin validated: This code is only for debugging purposes and had been tested manually. if ( _enableConsoleOut ) consoleOut(vFrame, QString("Tx:%1").arg(_txFrameCount)); + // coco end emit didFrameTransmit(ok); }