Skip to content
Snippets Groups Projects
Commit 314a4c0d authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved some bugs in the dynamixel v2 sync write command.

Updated the number of EEPROM variables.
parent f74fe90b
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,7 @@ extern "C" {
#define PAGE_FULL ((uint8_t)0x80)
/* Variables' number */
#define NB_OF_VAR ((uint8_t)0x54)
#define NB_OF_VAR ((uint8_t)0x60)
/* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
......
......@@ -58,12 +58,12 @@ void manager_send_motion_command(void)
{
servo_ids[num]=manager_servos[i].id;
manager_servos[i].ccw_comp=(1<<(manager_current_slopes[i]&0x0F));
write_data[num].data_addr=(uint8_t *)&(manager_servos[i].cw_comp);
write_data[num].data_addr=(uint8_t *)&(manager_servos[i].ccw_comp);
num++;
}
}
if(num>0)
dyn_master_sync_write(&darwin_dyn_master_v2,num,servo_ids,P_CW_COMPLIANCE_SLOPE,3,write_data);
dyn_master_sync_write(&darwin_dyn_master_v2,num,servo_ids,XL_P_GAIN,3,write_data);
}
inline uint16_t manager_angle_to_value(uint8_t servo_id,int16_t angle)
......@@ -295,7 +295,7 @@ void manager_init(uint16_t period_us)
// set the action current angles
manager_current_angles[i]=manager_servos[i].current_angle<<9;
manager_num_servos++;
current=0;
current++;
}
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