Motor control thread, windows terminate control.

Signed-off-by: cctsao1008 <chiacheng.tsao@gmail.com>