Skip to content

Commit

Permalink
Add group checking for slave input offset calculation
Browse files Browse the repository at this point in the history
Some slaves can be at different group and do not use overlap PDO map,
Let ec_config_overlap_map_group only change the input offset for current group.
  • Loading branch information
Wanga committed Aug 4, 2021
1 parent 04f7bae commit 9fef1fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion soem/ethercatconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,10 @@ int ecx_config_overlap_map_group(ecx_contextt *context, void *pIOmap, uint8 grou
/* Move calculated inputs with OBytes offset*/
for (slave = 1; slave <= *(context->slavecount); slave++)
{
context->slavelist[slave].inputs += context->grouplist[group].Obytes;
if (!group || (group == context->slavelist[slave].group))
{
context->slavelist[slave].inputs += context->grouplist[group].Obytes;
}
}

if (!group)
Expand Down

0 comments on commit 9fef1fc

Please sign in to comment.