Actually that is not my problem, I am new to the threads concept.
Maybe you're right. But please try to change
if(port->bytesAvailable())
if(port->bytesAvailable())
To copy to clipboard, switch view to plain text mode
to this
if(port->bytesAvailable()>0)
if(port->bytesAvailable()>0)
To copy to clipboard, switch view to plain text mode
and this
i = port->read(buff,numBytes);
i = port->read(buff,numBytes);
To copy to clipboard, switch view to plain text mode
into this
if ( (i = port->read(buff,numBytes) <=0 ) return;
if ( (i = port->read(buff,numBytes) <=0 ) return;
To copy to clipboard, switch view to plain text mode
And again why 1ms?
Bookmarks