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

Improved alias/position addressing in case od duplicated aliases.

parent 13833f2b
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,6 @@ Version 1.4.0: ...@@ -21,7 +21,6 @@ Version 1.4.0:
- Add a -n (numeric) switch. - Add a -n (numeric) switch.
- Check for options, remove global variables. - Check for options, remove global variables.
- Remove MasterDevice::slaveCount(). - Remove MasterDevice::slaveCount().
- Alias index?
- Add 'etherlab version'. - Add 'etherlab version'.
Future issues: Future issues:
......
...@@ -143,12 +143,11 @@ Command::SlaveList Command::selectedSlaves(MasterDevice &m) ...@@ -143,12 +143,11 @@ Command::SlaveList Command::selectedSlaves(MasterDevice &m)
aliasIndex = 0; aliasIndex = 0;
for (i = 0; i < numSlaves; i++) { for (i = 0; i < numSlaves; i++) {
m.getSlave(&slave, i); m.getSlave(&slave, i);
if (slave.alias) { // FIXME 'lock' first alias if (slave.alias && slave.alias == (uint16_t) alias) {
lastAlias = slave.alias; lastAlias = slave.alias;
aliasIndex = 0; aliasIndex = 0;
} }
if (lastAlias == (uint16_t) alias if (lastAlias && aliasIndex == (unsigned int) position) {
&& aliasIndex == (unsigned int) position) {
list.push_back(slave); list.push_back(slave);
} }
aliasIndex++; aliasIndex++;
......
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