Always clear PDO assignment of configured sync managers.

This commit is contained in:
Florian Pose 2016-01-22 10:11:58 +01:00
parent 2b18e00116
commit 8812d5bf73
2 changed files with 4 additions and 2 deletions

View File

@ -232,8 +232,9 @@ int ecrt_slave_config_pdos(ec_slave_config_t *sc,
if (ret)
return ret;
ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
if (sync_info->n_pdos && sync_info->pdos) {
ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
for (j = 0; j < sync_info->n_pdos; j++) {
pdo_info = &sync_info->pdos[j];

View File

@ -702,8 +702,9 @@ int ecrt_slave_config_pdos(ec_slave_config_t *sc,
if (ret)
return ret;
ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
if (sync_info->n_pdos && sync_info->pdos) {
ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
for (j = 0; j < sync_info->n_pdos; j++) {
pdo_info = &sync_info->pdos[j];