Skip to content
Snippets Groups Projects
Commit 5f816248 authored by Sergi Hernandez Juan's avatar Sergi Hernandez Juan
Browse files

Solved a bug when reading the current position of servos with protocol 1 or specific models.

parent a5e4d7cf
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ void mmanager_compute_targets(TMotionManager *mmanager)
angle=(mmanager->servo_values[i].target_angle>>9)+offsets[i]+(mmanager->servo_values[i].offset<<3);
//>>16 from the action codification, <<7 from the manager codification
mmanager->servo_values[i].target_value=mmanager_angle_to_value(mmanager,i,angle);
if(mmanager->servo_configs[i]->protocol_ver==1 || mmanager->servo_configs[i]->model!=29 || mmanager->servo_configs[i]->model!=310 || mmanager->servo_configs[i]->model!=320 || mmanager->servo_configs[i]->model!=360)// get the target value as the feedback
if(mmanager->servo_configs[i]->protocol_ver==1 || (mmanager->servo_configs[i]->model!=29 && mmanager->servo_configs[i]->model!=310 && mmanager->servo_configs[i]->model!=320 && mmanager->servo_configs[i]->model!=360))// get the target value as the feedback
{
mmanager->memory->data[mmanager->ram_base_address+MM_CURRENT_ANGLES_OFFSET+i*2]=angle&0x00FF;
mmanager->memory->data[mmanager->ram_base_address+MM_CURRENT_ANGLES_OFFSET+i*2+1]=(angle>>8)&0x00FF;
......
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