Android Question Wrong group forgive me. Flushing incoming bytes from serial ports.

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody
I'd like to flush incoming bytes from serial port. I have a long running task and incoming bytes will queue on their ports. Is it possible to check the incoming stream or to clear it while executing sub?

Thank you!

Mauro Zanin
 

DonManfred

Expert
Licensed User
Longtime User
I have a long running task
what are you doing in the long running task?

Maybe you can change it to work async. Each time you are waiting for a result (using wait for for ex) your service can handle the incoming data from the serial.

Or add a sleep(100) from time to time
 
Upvote 0
Top