Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnaboscoL authored Oct 20, 2016
1 parent 9970b65 commit f7ccbfe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions soem_master/soem_master_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ bool SoemMasterComponent::checkNetworkState(ec_state desired_state, int timeout
if(!error_detected)
{
//All the slaves have reached the same state so we can update the state of every slave
for(int i = 0; i < ec_slavecount; i++)
for(int i = 1; i <= ec_slavecount; i++)
{
ec_slave[i].state = network_state;
}
Expand All @@ -320,7 +320,6 @@ bool SoemMasterComponent::checkNetworkState(ec_state desired_state, int timeout
{
ec_readstate();
}

break;

default:
Expand All @@ -345,7 +344,7 @@ bool SoemMasterComponent::checkNetworkState(ec_state desired_state, int timeout
<< endlog();

//If not all slaves reached target state find out which one
for (int i = 0; i <= ec_slavecount; i++)
for (int i = 1; i <= ec_slavecount; i++)
{
if (ec_slave[i].state != desired_state)
{
Expand Down

0 comments on commit f7ccbfe

Please sign in to comment.