From ae2588e822eeb9e4424b0730821f08d24d194efb Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Thu, 30 Jul 2020 15:48:09 +0200
Subject: [PATCH] The action module casts the servo angle data to signed type.

---
 dynamixel_manager/src/modules/action.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dynamixel_manager/src/modules/action.c b/dynamixel_manager/src/modules/action.c
index 4720389..c21dd68 100755
--- a/dynamixel_manager/src/modules/action.c
+++ b/dynamixel_manager/src/modules/action.c
@@ -120,7 +120,7 @@ void action_load_next_step(TActionMModule *action)
   {
     if(mmanager_get_module(action->mmodule.manager,i)==MM_ACTION)
     {
-      angle=action->current_page.steps[action->current_step_index].position[i];
+      angle=(signed short int)action->current_page.steps[action->current_step_index].position[i];
       if(angle==0x5A00)// bigger than 180
         target_angles=action->mmodule.manager->servo_values[i].target_angle;
       else
@@ -131,9 +131,9 @@ void action_load_next_step(TActionMModule *action)
       else
       {
         if(action->current_step_index==action->current_page.header.stepnum-1)
-          next_angle=action->next_page.steps[0].position[i];
+          next_angle=(signed short int)action->next_page.steps[0].position[i];
         else
-          next_angle=action->current_page.steps[action->current_step_index+1].position[i];
+          next_angle=(signed short int)action->current_page.steps[action->current_step_index+1].position[i];
         if(next_angle==0x5A00)
           next_angles=target_angles;
         else
-- 
GitLab