Only query Sdo information service, if slave supports it.

This commit is contained in:
Florian Pose 2008-09-24 08:32:55 +00:00
parent a82d2dbf39
commit 86956a05c8
2 changed files with 10 additions and 0 deletions

View File

@ -281,6 +281,13 @@ void ec_fsm_coe_dict_start(ec_fsm_coe_t *fsm /**< finite state machine */)
return;
}
if (slave->sii.has_general && !slave->sii.coe_details.enable_sdo_info) {
EC_ERR("Slave %u does not support Sdo information service!\n",
slave->ring_position);
fsm->state = ec_fsm_coe_error;
return;
}
if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 8))) {
fsm->state = ec_fsm_coe_error;
return;

View File

@ -489,8 +489,11 @@ void ec_fsm_master_action_idle(
slave < master->slaves + master->slave_count;
slave++) {
if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)
|| (slave->sii.has_general
&& !slave->sii.coe_details.enable_sdo_info)
|| slave->sdo_dictionary_fetched
|| slave->current_state == EC_SLAVE_STATE_INIT
|| slave->current_state == EC_SLAVE_STATE_UNKNOWN
|| jiffies - slave->jiffies_preop < EC_WAIT_SDO_DICT * HZ
) continue;