Output slave headers in 'ethercat slaves'; show alias only if set.

This commit is contained in:
Florian Pose 2008-06-27 09:53:09 +00:00
parent 99c4e763c6
commit 79083c4921
1 changed files with 6 additions and 3 deletions

View File

@ -1435,8 +1435,12 @@ void Master::showSlave(uint16_t slavePosition)
getSlave(&slave, slavePosition);
cout << "Slave " << dec << slavePosition << endl
<< "Alias: " << slave.alias << endl
cout << "=== Slave " << dec << slavePosition << " ===" << endl;
if (slave.alias)
cout << "Alias: " << slave.alias << endl;
cout
<< "State: " << slaveState(slave.state) << endl
<< "Flag: " << (slave.error_flag ? 'E' : '+') << endl
<< "Identity:" << endl
@ -1519,7 +1523,6 @@ void Master::showSlave(uint16_t slavePosition)
<< " Current consumption: "
<< dec << slave.current_on_ebus << " mA" << endl;
}
cout << endl;
}
/****************************************************************************/