diff --git a/resources/external_control.urscript b/resources/external_control.urscript index 164db7358..2462f3517 100644 --- a/resources/external_control.urscript +++ b/resources/external_control.urscript @@ -1083,6 +1083,13 @@ while control_mode > MODE_STOPPED: end else: textmsg("Socket timed out waiting for command on reverse_socket. The script will exit now.") + if control_mode == MODE_FREEDRIVE: + end_freedrive_mode() + end + control_mode = MODE_STOPPED + kill thread_move + kill thread_trajectory + kill thread_script_commands stopj(STOPJ_ACCELERATION) halt end