master/fsm_change.c
changeset 443 0746236dd032
parent 439 0f5a3d983908
child 454 25cc4a3b9e0a
equal deleted inserted replaced
442:6607875255d9 443:0746236dd032
   386         EC_INFO("Acknowledged state %s on slave %i.\n",
   386         EC_INFO("Acknowledged state %s on slave %i.\n",
   387                 state_str, slave->ring_position);
   387                 state_str, slave->ring_position);
   388         return;
   388         return;
   389     }
   389     }
   390 
   390 
   391     if (datagram->jiffies_received
   391     if (datagram->jiffies_received - fsm->jiffies_start >= HZ) { // 1s
   392         - fsm->jiffies_start >= 100 * HZ / 1000) { // 100ms
   392         // timeout while checking
   393         char state_str[EC_STATE_STRING_SIZE];
   393         char state_str[EC_STATE_STRING_SIZE];
   394         ec_state_string(fsm->requested_state, state_str);
   394         ec_state_string(slave->current_state, state_str);
   395         // timeout while checking
       
   396         slave->current_state = EC_SLAVE_STATE_UNKNOWN;
       
   397         fsm->state = ec_fsm_change_error;
   395         fsm->state = ec_fsm_change_error;
   398         EC_ERR("Timeout while acknowledging state %s on slave %i.\n",
   396         EC_ERR("Timeout while acknowledging state %s on slave %i.\n",
   399                state_str, slave->ring_position);
   397                state_str, slave->ring_position);
   400         return;
   398         return;
   401     }
   399     }