Hmm, well thats a bit more simple than I thought... however, I was more concerned about no information coming over because of a radio failure between the robot and the oi or some interfereance...
Quote:
Originally posted by rbayer
Even if you do, by some mysterious fluke of Windows, loose a byte from the middle of a 24-byte read, checking for the start of the packet on each loop will make sure it corrects itself.
|
Well, suppose the check fails... what if the first two bytes aren't 255's... I suppose you have to switch to a read-1-byte-at-a-time loop until you DO get two consequetive 255's?