Fixed the queue of TX messages. Had to be moved to the worker thread.
This commit is contained in:
@@ -228,14 +228,10 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
|
|||||||
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, mElapsedTimer.nsecsElapsed() / 1000));
|
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, mElapsedTimer.nsecsElapsed() / 1000));
|
||||||
//workingFrame.timestamp -= mTimestampBasis;
|
//workingFrame.timestamp -= mTimestampBasis;
|
||||||
}
|
}
|
||||||
//txFrame = conn->getQueue().get();
|
|
||||||
QCoreApplication::processEvents();
|
|
||||||
//*txFrame = workingFrame;
|
|
||||||
//conn->getQueue().queue();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//copy pframe so the stack can be used while we send, prevents needing BlockingQueuedConnection
|
|
||||||
// CANFrame frameCopy;
|
// CANFrame frameCopy;
|
||||||
// frameCopy.bus = workingFrame.bus;
|
// frameCopy.bus = workingFrame.bus;
|
||||||
// //cFrame.timedelta
|
// //cFrame.timedelta
|
||||||
@@ -263,7 +259,13 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
|
|||||||
// frameCopy.setError(workingFrame.error());
|
// frameCopy.setError(workingFrame.error());
|
||||||
// ///* If recorded frame has a local echo, it is a Tx message, and thus should not be marked as Rx */
|
// ///* If recorded frame has a local echo, it is a Tx message, and thus should not be marked as Rx */
|
||||||
// frameCopy.isReceived = workingFrame.isReceived;
|
// frameCopy.isReceived = workingFrame.isReceived;
|
||||||
////////////////////////////////////////////
|
// ////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// txFrame = conn->getQueue().get();
|
||||||
|
// QCoreApplication::processEvents();
|
||||||
|
// *txFrame = frameCopy; //workingFrame
|
||||||
|
// conn->getQueue().queue();
|
||||||
|
|
||||||
|
|
||||||
return conn->sendFrame(workingFrame);
|
return conn->sendFrame(workingFrame);
|
||||||
|
|||||||
@@ -173,7 +173,10 @@ bool CANConnection::sendFrame(const CANFrame& pFrame)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CANFrame *txFrame;
|
||||||
|
txFrame = getQueue().get();
|
||||||
|
*txFrame = pFrame;
|
||||||
|
getQueue().queue();
|
||||||
|
|
||||||
return piSendFrame(pFrame);
|
return piSendFrame(pFrame);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user