Improved alias/position addressing in case od duplicated aliases.
This commit is contained in:
parent
6429bc5f26
commit
ddc95f672f
1
TODO
1
TODO
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue