mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-19 10:25:50 +08:00
Set initial state of all slaves to PREOP.
This commit is contained in:
+3
-10
@@ -946,17 +946,10 @@ void ec_fsm_master_scan_slaves(ec_fsm_t *fsm /**< finite state machine */)
|
||||
|
||||
ec_master_calc_addressing(master);
|
||||
|
||||
// determine initial states.
|
||||
// set initial states of all slaves to PREOP to make mailbox
|
||||
// communication possible
|
||||
list_for_each_entry(slave, &master->slaves, list) {
|
||||
if (ec_slave_is_coupler(slave)) {
|
||||
slave->requested_state = EC_SLAVE_STATE_OP;
|
||||
}
|
||||
else {
|
||||
if (master->mode == EC_MASTER_MODE_OPERATION)
|
||||
slave->requested_state = EC_SLAVE_STATE_PREOP;
|
||||
else
|
||||
slave->requested_state = EC_SLAVE_STATE_INIT;
|
||||
}
|
||||
slave->requested_state = EC_SLAVE_STATE_PREOP;
|
||||
}
|
||||
|
||||
fsm->master_state = ec_fsm_master_start;
|
||||
|
||||
Reference in New Issue
Block a user