AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Qserialport qt8/30/2023 ![]() The SerialPort always closes immediately and the destructor sails through with no hangups on QThread::wait()ĮDIT: I am certain it is the serial->close() which is hanging because I can see the qDebug() statement being printed just before it hangs for several seconds or minutes). QDebug() errorCode() I get the UknownError string but that happens even when the port closes with no hangups.ĮDIT: This NEVER happens in the debugger. Thread is exiting, clean up resources it created ![]() emit signal to main thread that data is ready Do something to a shared data structure Signal device to disconnect so that it can suspend USB CDC transmission of data / If CommThread::disconnect() is called send DISCONNECT Packet ![]() Serial->setBaudRate(QSerialPort::Baud115200) I am developing a multi-threaded app, with one thread responsible for UI and the other for serial communication. I am trying to close a serial port opened using the QSerialPort library but it hangs more than half the time.
0 Comments
Read More
Leave a Reply. |