master/fsm_pdo_mapping.c
changeset 835 23fd8b510803
parent 827 205eccb70bce
child 854 f4f53be425ac
equal deleted inserted replaced
834:0791aac03180 835:23fd8b510803
   178 
   178 
   179         // check if mapping has to be altered
   179         // check if mapping has to be altered
   180         if (ec_pdo_mapping_equal(&fsm->sync->mapping, fsm->mapping))
   180         if (ec_pdo_mapping_equal(&fsm->sync->mapping, fsm->mapping))
   181             continue;
   181             continue;
   182 
   182 
       
   183         // Pdo mapping has to be changed. Does the slave support this?
       
   184         if (!fsm->slave->sii.mailbox_protocols & EC_MBOX_COE
       
   185                 || (fsm->slave->sii.has_general
       
   186                     && !fsm->slave->sii.coe_details.enable_pdo_assign)) {
       
   187             EC_ERR("Slave %u does not support changing the Pdo mapping!\n",
       
   188                     fsm->slave->ring_position);
       
   189             fsm->state = ec_fsm_pdo_mapping_state_error;
       
   190             return;
       
   191         }
       
   192 
   183         if (fsm->slave->master->debug_level) {
   193         if (fsm->slave->master->debug_level) {
   184             EC_DBG("Changing Pdo mapping for SM%u of slave %u.\n",
   194             EC_DBG("Changing Pdo mapping for SM%u of slave %u.\n",
   185                     fsm->sync->index, fsm->slave->ring_position);
   195                     fsm->sync->index, fsm->slave->ring_position);
   186         }
   196         }
   187 
   197