Fixes in state change FSM.
authorFlorian Pose <fp@igh-essen.com>
Wed, 25 Oct 2006 13:32:17 +0000
changeset 443 0746236dd032
parent 442 6607875255d9
child 444 31223539fc00
Fixes in state change FSM.
master/fsm_change.c
--- a/master/fsm_change.c	Wed Oct 25 07:41:14 2006 +0000
+++ b/master/fsm_change.c	Wed Oct 25 13:32:17 2006 +0000
@@ -388,12 +388,10 @@
         return;
     }
 
-    if (datagram->jiffies_received
-        - fsm->jiffies_start >= 100 * HZ / 1000) { // 100ms
+    if (datagram->jiffies_received - fsm->jiffies_start >= HZ) { // 1s
+        // timeout while checking
         char state_str[EC_STATE_STRING_SIZE];
-        ec_state_string(fsm->requested_state, state_str);
-        // timeout while checking
-        slave->current_state = EC_SLAVE_STATE_UNKNOWN;
+        ec_state_string(slave->current_state, state_str);
         fsm->state = ec_fsm_change_error;
         EC_ERR("Timeout while acknowledging state %s on slave %i.\n",
                state_str, slave->ring_position);