|
-
April 20th, 1999, 02:27 PM
#1
flushing the COM port
I've written an app which reads and write from COM1 and COM2. The input from COM1 is data from a camera telling me the location of a robot and a ball it is chasing. I read in that data from COM1 a few bytes at a time, process it, then send out data on COM2 to tell the robot where to move.
The problem is, when I go back after this cycle to read more data from the camera, the data has been buffered so instead of the most current data it is at least a second old. This is not acceptable when the ball and the robot are both moving in realtime.
If anyone knows how to force a flush of a COM port in vc++ I would be most appreciative.
anthony
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|