Home > Back-end >  QT serial port
QT serial port

Time:09-23

Bosses, I came across a problem, qt read serial port for lower machine data is sent too fast, every time when reading a serial port using qt procedure is 4096 bytes read trigger signals, excuse me how can directly read a frame of data frame, 4096 read time more than ten seconds after bad

CodePudding user response:

Use a timer or threads, read regularly

CodePudding user response:

While (true)
{
ReadData (... );
sleep(1);
}
Loop reads

CodePudding user response:

No matter use a timer or the thread of what all can't read, and how to read print buffer data to 0, like serial didn't receive the 4096 bytes will not report to QT applications

CodePudding user response:

Sending data sent by the way, if not too fast, a serial port receives is normal, and I am using QT4 Qextserialport and tripartite library

CodePudding user response:

For bosses, yao has a similar situation
  • Related