Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!12Ubuntu 18 04
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment