Skip to content
Snippets Groups Projects
Commit a240046a authored by Florian Pose's avatar Florian Pose
Browse files

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

parent 8ce8238b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
/****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment