Improved alias/position addressing in case od duplicated aliases.
--- a/TODO Mon Jul 28 11:43:08 2008 +0000
+++ b/TODO Mon Jul 28 12:11:50 2008 +0000
@@ -21,7 +21,6 @@
- Add a -n (numeric) switch.
- Check for options, remove global variables.
- Remove MasterDevice::slaveCount().
- - Alias index?
- Add 'etherlab version'.
Future issues:
--- a/tool/Command.cpp Mon Jul 28 11:43:08 2008 +0000
+++ b/tool/Command.cpp Mon Jul 28 12:11:50 2008 +0000
@@ -143,12 +143,11 @@
aliasIndex = 0;
for (i = 0; i < numSlaves; i++) {
m.getSlave(&slave, i);
- if (slave.alias) { // FIXME 'lock' first alias
+ if (slave.alias && slave.alias == (uint16_t) alias) {
lastAlias = slave.alias;
aliasIndex = 0;
}
- if (lastAlias == (uint16_t) alias
- && aliasIndex == (unsigned int) position) {
+ if (lastAlias && aliasIndex == (unsigned int) position) {
list.push_back(slave);
}
aliasIndex++;