Frame playback via the playback dialog window is now working.

This commit is contained in:
Collin Kidder
2015-05-09 10:07:23 -04:00
parent d86f539d5a
commit 8ca7b3548f
7 changed files with 26 additions and 8 deletions
+4 -1
View File
@@ -50,12 +50,14 @@ void SerialWorker::readSerialData()
}
}
void SerialWorker::sendFrame(CANFrame *frame, int bus = 0)
void SerialWorker::sendFrame(const CANFrame *frame, int bus = 0)
{
QByteArray buffer;
int c;
int ID;
qDebug() << "Sending out frame with id " << frame->ID;
ID = frame->ID;
if (frame->extended) ID |= 1 << 31;
@@ -75,6 +77,7 @@ void SerialWorker::sendFrame(CANFrame *frame, int bus = 0)
if (serial == NULL) return;
if (!serial->isOpen()) return;
qDebug() << "writing " << buffer.length() << " bytes to serial port";
serial->write(buffer);
}