PDA

View Full Version : How to interrupt serial port sending?



redkit_redkit
7th April 2014, 17:33
Hi guys;
On my project, i'm sending data through serial port and getting answers to them.
What i want to do is, i wanna stop sending when received the first character. How can i do this? Have any ideas?
And i'm using Qt5.1.

Thank you guys!

wysota
8th April 2014, 08:44
Well... if you want to stop sending data then just don't send any more data... What exactly is the problem?

redkit_redkit
9th April 2014, 12:29
If receiving begins in the middle of sending At that time i don't want it to send anymore characters. After receiving finished, i want to continue sending with a new package.

wysota
9th April 2014, 12:58
So set some flag in the receiving code and check that flag before sending a new package.