Skip to content

Commit

Permalink
Merge pull request #15 from Huzifa1/master
Browse files Browse the repository at this point in the history
Fix a bug in the import
  • Loading branch information
deffel authored Nov 4, 2024
2 parents 018ba29 + 978a511 commit 9ca7b5e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion gui/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,24 @@ example.Toolbar = Class.extend({

getNodeIdFpgalink: function (string_n, fpganodes) {
// n00, ..
let found_node;
for (let i = 0; i < fpganodes.length; i++) {
const node = fpganodes[i];
if (node.getName() == string_n) {
return node;
found_node = node;
break;
}
}

// This case happens when for example there is already n00 created
// and the user import a new node with needle n00, e.g: --fpgalink=n00:acl1:ch0-n00:acl1:ch1
// In this case I need to return the correct node
if (!found_node) {
let fpga_index = parseInt(string_n.substring(1))
found_node = fpganodes[fpga_index];
}

return found_node;
},

getSwitchFromName: function (name, switches) {
Expand Down

0 comments on commit 9ca7b5e

Please sign in to comment.