Improved alias/position addressing in case od duplicated aliases.

This commit is contained in:
Florian Pose 2008-07-28 12:11:50 +00:00
parent 6429bc5f26
commit ddc95f672f
2 changed files with 2 additions and 4 deletions

1
TODO
View File

@ -21,7 +21,6 @@ Version 1.4.0:
- Add a -n (numeric) switch.
- Check for options, remove global variables.
- Remove MasterDevice::slaveCount().
- Alias index?
- Add 'etherlab version'.
Future issues:

View File

@ -143,12 +143,11 @@ Command::SlaveList Command::selectedSlaves(MasterDevice &m)
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++;