Improved resetting number of responding slaves. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 09 Dec 2011 10:35:23 +0100
branchstable-1.5
changeset 2169 1a128e86d4f6
parent 2168 670cd8aa273d
child 2170 e69a5010914f
Improved resetting number of responding slaves.
master/fsm_master.c
master/master.c
--- a/master/fsm_master.c	Fri Dec 09 10:46:25 2011 +0100
+++ b/master/fsm_master.c	Fri Dec 09 10:35:23 2011 +0100
@@ -218,6 +218,8 @@
 #endif
         ec_master_clear_slaves(master);
         fsm->slave_states = 0x00;
+        fsm->slaves_responding = 0; /* reset to trigger rescan on next link
+                                       up. */
     }
     fsm->link_state = master->main_device.link_state;
 
--- a/master/master.c	Fri Dec 09 10:46:25 2011 +0100
+++ b/master/master.c	Fri Dec 09 10:35:23 2011 +0100
@@ -549,6 +549,10 @@
     master->cb_data = master;
 
     master->phase = EC_IDLE;
+
+    // reset number of responding slaves to trigger scanning
+    master->fsm.slaves_responding = 0;
+
     ret = ec_master_thread_start(master, ec_master_idle_thread,
             "EtherCAT-IDLE");
     if (ret)