Commit ae2588e8 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

The action module casts the servo angle data to signed type.

parent a682f15c
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment