A small fix to make transmitted frame timestamps a bit more accurate
but still not synced to capture device.
This commit is contained in:
@@ -19,6 +19,8 @@ SerialWorker::SerialWorker(CANFrameModel *model, QObject *parent) : QObject(pare
|
||||
isAutoRestart = false;
|
||||
targetID = -1;
|
||||
|
||||
txTimestampBasis = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
readSettings();
|
||||
}
|
||||
|
||||
@@ -157,6 +159,7 @@ void SerialWorker::sendFrame(const CANFrame *frame, int bus = 0)
|
||||
int ID;
|
||||
CANFrame tempFrame = *frame;
|
||||
tempFrame.isReceived = false;
|
||||
tempFrame.timestamp = ((QDateTime::currentMSecsSinceEpoch() - txTimestampBasis) * 1000);
|
||||
|
||||
//qDebug() << "Sending out frame with id " << frame->ID;
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ private:
|
||||
bool can0Enabled, can1Enabled;
|
||||
int deviceBuildNum;
|
||||
int deviceSingleWireMode;
|
||||
uint64_t txTimestampBasis;
|
||||
|
||||
void procRXChar(unsigned char);
|
||||
void sendCommValidation();
|
||||
|
||||
Reference in New Issue
Block a user