pafra88 / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Mac OS X - reads require some delay to work #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Poll readAll in a loop. Same code works fine on the Win.
2.
3.

What is the expected output? What do you see instead?

readAll returns 0;

What version of the product are you using? On what operating system?
Mac OS X 10.6.3

Please provide any additional information below.

The code below works:
void CSerial::readInput()
{
    QByteArray temp = port->readAll();

    qDebug("TEST");

    for (int i = 0; i < temp.size(); i++)
        m_buffer->push_back(temp[i]); // put stuff into a buffer for processing
}

But if I remove the qDebug it does not work - it always reads 0. I have 
replaced qDebug with 
usleep(100) which makes the code work but it is still painfully slow. I have 
also tried flushing io 
but that did not have any effect.

Original issue reported on code.google.com by akan.ha...@gmail.com on 29 Apr 2010 at 10:34

GoogleCodeExporter commented 8 years ago
We can close this since I have found the problem to be something outside of the
qextserialport.

Original comment by akan.ha...@gmail.com on 10 May 2010 at 4:42

GoogleCodeExporter commented 8 years ago
What was the problem in your case? I've been running into a similar issue using 
Mac OS X.

Original comment by jeremyrc...@gmail.com on 21 Jul 2010 at 3:46

GoogleCodeExporter commented 8 years ago

Original comment by dbzhang...@gmail.com on 14 Jun 2012 at 1:27