Closed KurtE closed 8 years ago
Hi KurtE,
I tried this pull request on my RP2, and found that it fixed most latency issues when setting the IDs. But when writing to the register 30 to control the rotation of the servos, it still fails to write from time to time. So still a bit buggy here.
I was running into lots of messages failing. Example dxl_monitor scan would fail reasonably often, likewise id command or wr command... Likewise PS3_Demo would fail to startup maybe half the time.
This modificiation is to add a call to tcdrain which waits until the transmit buffer is empty, before it sets the packet timeout. This appears to resolve most/all of the failures I was seeing.
Note: This may not remove all of the latency issues, but at least if there are delays on sending out the packet the code will wait for this before trying to get a response.