From be10d94c72e3d98532badec01ad0f155df32f023 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Tue, 28 Oct 2014 15:38:40 +0000
Subject: [PATCH] Solved a problem in the execution od motion sequences in the
 ptu_d46 and dynamixel_motor_control node. The sequence continue after the
 stop function was called.

---
 src/dynamixel_motor_group.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/dynamixel_motor_group.cpp b/src/dynamixel_motor_group.cpp
index 7f27a17..4136c56 100644
--- a/src/dynamixel_motor_group.cpp
+++ b/src/dynamixel_motor_group.cpp
@@ -692,6 +692,9 @@ void *CDynamixelMotorGroup::sequence_thread(void *param)
 		   mtn_seq->stop();
 		   mtn_seq->sequence_error_msg="Motion sequence stopped by user";
 		   mtn_seq->sequence_current_step=0;
+                   to=-1;
+                   if(!mtn_seq->event_server->event_is_set(mtn_seq->sequence_complete_event_id))
+                     mtn_seq->event_server->set_event(mtn_seq->sequence_complete_event_id);
 		   break; 
 	  case 3: /* resume sequence */
 		   mtn_seq->sequence_current_step++;
-- 
GitLab