Added EC_WAIT_SDO_DICT define.
authorFlorian Pose <fp@igh-essen.com>
Fri, 20 Oct 2006 12:54:32 +0000
changeset 427 f70c7c6db7f4
parent 426 0d3022ee35a2
child 428 2731a2fcc18d
Added EC_WAIT_SDO_DICT define.
master/fsm.c
master/globals.h
--- a/master/fsm.c	Fri Oct 20 12:50:28 2006 +0000
+++ b/master/fsm.c	Fri Oct 20 12:54:32 2006 +0000
@@ -609,7 +609,7 @@
         if (!(slave->sii_mailbox_protocols & EC_MBOX_COE)
             || slave->sdo_dictionary_fetched
             || slave->current_state == EC_SLAVE_STATE_INIT
-            || jiffies - slave->jiffies_preop < 5 * HZ
+            || jiffies - slave->jiffies_preop < EC_WAIT_SDO_DICT * HZ
             || !slave->online
             || slave->error_flag) continue;
 
--- a/master/globals.h	Fri Oct 20 12:50:28 2006 +0000
+++ b/master/globals.h	Fri Oct 20 12:54:32 2006 +0000
@@ -77,6 +77,10 @@
 /** datagram timeout in microseconds */
 #define EC_IO_TIMEOUT 500
 
+/** Seconds to wait before fetching SDO dictionary
+    after slave entered PREOP state. */
+#define EC_WAIT_SDO_DICT 3
+
 /** minimum size of a buffer used with ec_state_string() */
 #define EC_STATE_STRING_SIZE 30