Fixed bug that caused the last slave not to be scanned.
--- a/master/fsm_master.c Mon Jan 15 09:49:07 2007 +0000
+++ b/master/fsm_master.c Tue Feb 06 15:13:51 2007 +0000
@@ -697,15 +697,15 @@
void ec_fsm_master_state_scan_slaves(ec_fsm_master_t *fsm /**< master state machine */)
{
ec_master_t *master = fsm->master;
- ec_slave_t *slave = fsm->slave;
+ ec_slave_t *slave;
if (ec_fsm_slave_exec(&fsm->fsm_slave)) // execute slave state machine
return;
// another slave to fetch?
- if (slave->list.next != &master->slaves) {
+ if (fsm->slave->list.next != &master->slaves) {
fsm->slave = list_entry(fsm->slave->list.next, ec_slave_t, list);
- ec_fsm_slave_start_scan(&fsm->fsm_slave, slave);
+ ec_fsm_slave_start_scan(&fsm->fsm_slave, fsm->slave);
ec_fsm_slave_exec(&fsm->fsm_slave); // execute immediately
return;
}