Set initial state of all slaves to PREOP.
authorFlorian Pose <fp@igh-essen.com>
Fri, 20 Oct 2006 12:57:09 +0000
changeset 428 2731a2fcc18d
parent 427 f70c7c6db7f4
child 429 b21b000e88e3
Set initial state of all slaves to PREOP.
master/fsm.c
--- a/master/fsm.c	Fri Oct 20 12:54:32 2006 +0000
+++ b/master/fsm.c	Fri Oct 20 12:57:09 2006 +0000
@@ -946,17 +946,10 @@
 
     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;