Fixed bug in master state machine.
authorFlorian Pose <fp@igh-essen.com>
Fri, 20 Oct 2006 12:50:28 +0000
changeset 426 0d3022ee35a2
parent 425 d36808888817
child 427 f70c7c6db7f4
Fixed bug in master state machine.
master/fsm.c
--- a/master/fsm.c	Fri Oct 20 12:45:06 2006 +0000
+++ b/master/fsm.c	Fri Oct 20 12:50:28 2006 +0000
@@ -929,7 +929,6 @@
     ec_master_t *master = fsm->master;
     ec_slave_t *slave = fsm->slave;
 
-
     fsm->slave_state(fsm); // execute slave state machine
 
     if (fsm->slave_state != ec_fsm_end
@@ -1042,8 +1041,8 @@
     fsm->coe_state(fsm); // execute CoE state machine
 
     if (fsm->coe_state == ec_fsm_error) {
-        fsm->slave->error_flag = 1;
-        fsm->slave_state = ec_fsm_error;
+        fsm->master_state = ec_fsm_master_start;
+        fsm->master_state(fsm); // execute immediately
         return;
     }