KITmedical / kacanopen

Easy-to-use CanOpen stack and CanOpen-to-ROS bridge.
Other
94 stars 57 forks source link

Shutdown hangs when PERIODIC transmit PDO mapping is active #5

Closed tobijk closed 6 years ago

tobijk commented 6 years ago

When there is an active PERIODIC transmit PDO mapping, then kacanopen will not shut down cleanly. I haven't found a way to stop the transmitter thread from the API. Is this a bug, or am I missing something?

tobijk commented 6 years ago

Possibly the transmitter thread should be detach'ed right from the beginning?

thk1 commented 6 years ago

You are right, this seems to be a bug. Instead of detaching the thread, we should set a shutdown flag and then join. Would you mind testing the fix in branch issue5?

tobijk commented 6 years ago

Sure thing.

tobijk commented 6 years ago

Seems to work fine. Thanks!