Merge pull request #533 from qurrent-llc/fix_socketcandpartialframedrop
Fix socketcand empty frame drop
This commit is contained in:
@@ -288,18 +288,13 @@ QString SocketCANd::decodeFrames(QString data, int busNum)
|
|||||||
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, frameParsed[2].toDouble() * 1000000l));
|
buildFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, frameParsed[2].toDouble() * 1000000l));
|
||||||
//buildFrame.len = frameParsed[3].length() * 0.5;
|
//buildFrame.len = frameParsed[3].length() * 0.5;
|
||||||
|
|
||||||
if(frameParsed.length() < 4)
|
int framelength = 0;
|
||||||
|
|
||||||
|
if(frameParsed.length() == 4)
|
||||||
{
|
{
|
||||||
qDebug() << "Received frame doesn't contain any data: " << data;
|
framelength = frameParsed[3].length() * 0.5;
|
||||||
|
|
||||||
//todo
|
|
||||||
//this is not totally true, ive seen frames come through that look like < frame 1F020240 1664924225.371291 >
|
|
||||||
//if we found the closing token but theres no data then remove the message from the buffer
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int framelength = frameParsed[3].length() * 0.5;
|
|
||||||
|
|
||||||
buildData.resize(framelength);
|
buildData.resize(framelength);
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
|||||||
Reference in New Issue
Block a user