ROBOTIS-GIT / DynamixelSDK

ROBOTIS Dynamixel SDK (Protocol1.0/2.0)
http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/
Apache License 2.0
461 stars 410 forks source link

Fix "txpacket() randomly gets stuck on Linux" #621

Open fujimotos opened 7 months ago

fujimotos commented 7 months ago

This fixes the issue "Python SDK randomly gets stuck on txpacket()".

On the other hand, C/C++ SDK uses tcflush() for the same purpose, so simply dicards the data not transmitted yet. Fix Python SDK to do the same.

Related: See https://github.com/pyserial/pyserial/issues/625 for related discussion in pyserial/pyserial.