MB3hel / AUVControlBoard

Vectored 6-DOF motion controller for AUVs.
https://mb3hel.github.io/AUVControlBoard/
2 stars 2 forks source link

[BUG] cmdctrl target changes not thread safe #13

Open MB3hel opened 1 year ago

MB3hel commented 1 year ago

cmdctrl can change target when processing pc command, however timer thread is used to re-apply saved speed. Following sequence of operations needs to be impossible (but is not)

Sequence of accessing current mode & saved target speeds then setting speeds needs to be protected by mutex.