Avoided duplicate datagram, if Pdo mapping/assignment does not have to
authorFlorian Pose <fp@igh-essen.com>
Mon, 07 Apr 2008 15:58:27 +0000
changeset 891 fab139acf3b2
parent 890 1115793a76ed
child 892 1e1e567fc53b
Avoided duplicate datagram, if Pdo mapping/assignment does not have to
be configured.
master/fsm_slave_config.c
--- a/master/fsm_slave_config.c	Mon Apr 07 15:47:22 2008 +0000
+++ b/master/fsm_slave_config.c	Mon Apr 07 15:58:27 2008 +0000
@@ -568,9 +568,9 @@
     }
 
     // Start configuring Pdo mapping
+    ec_fsm_pdo_mapping_start(&fsm->fsm_pdo_mapping, fsm->slave);
     fsm->state = ec_fsm_slave_config_state_pdo_mapping;
-    ec_fsm_pdo_mapping_start(&fsm->fsm_pdo_mapping, fsm->slave);
-    ec_fsm_pdo_mapping_exec(&fsm->fsm_pdo_mapping); // execute immediately
+    fsm->state(fsm); // execute immediately
 }
 
 /*****************************************************************************/
@@ -594,9 +594,9 @@
     }
 
     // start applying alternate Pdo assignments
+    ec_fsm_pdo_assign_start(&fsm->fsm_pdo_assign, fsm->slave);
     fsm->state = ec_fsm_slave_config_state_pdo_assign;
-    ec_fsm_pdo_assign_start(&fsm->fsm_pdo_assign, fsm->slave);
-    ec_fsm_pdo_assign_exec(&fsm->fsm_pdo_assign); // execute immediately
+    fsm->state(fsm); // execute immediately
 }
 
 /*****************************************************************************/