Output slave headers in 'ethercat slaves'; show alias only if set.
--- a/tools/Master.cpp Fri Jun 27 09:48:45 2008 +0000
+++ b/tools/Master.cpp Fri Jun 27 09:53:09 2008 +0000
@@ -1435,8 +1435,12 @@
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 @@
<< " Current consumption: "
<< dec << slave.current_on_ebus << " mA" << endl;
}
- cout << endl;
}
/****************************************************************************/