Skip to content

Commit

Permalink
fix for spice CCCS/CCVS
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalstad committed Feb 11, 2021
1 parent 447a997 commit ab3d08a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/com/lushprojects/circuitjs1/client/CCCSElm.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void setParentList(Vector<CircuitElm> elmList) {
CircuitElm ce = elmList.get(j);
if (!(ce instanceof VoltageElm))
continue;
if (ce.getNode(0) == nodes[i] && ce.getNode(1) == nodes[i+1])
if (ce.getNode(1) == nodes[i] && ce.getNode(0) == nodes[i+1])
voltageSources[i/2] = (VoltageElm)ce;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/com/lushprojects/circuitjs1/client/CCVSElm.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void setParentList(Vector<CircuitElm> elmList) {
CircuitElm ce = elmList.get(j);
if (!(ce instanceof VoltageElm))
continue;
if (ce.getNode(0) == nodes[i] && ce.getNode(1) == nodes[i+1])
if (ce.getNode(1) == nodes[i] && ce.getNode(0) == nodes[i+1])
voltageSources[i/2] = (VoltageElm)ce;
}
}
Expand Down

0 comments on commit ab3d08a

Please sign in to comment.