mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-09 12:56:02 -04:00
unnamed tunnels are ignored silently, closes #338
This commit is contained in:
parent
59813c1c24
commit
06baf8c07e
@ -9,6 +9,7 @@ HEAD, planned as v0.24
|
||||
- The octal number format was added.
|
||||
- A push button combined with LED was added.
|
||||
- A VGA monitor was added.
|
||||
- Unnamed Tunnels are ignored silently.
|
||||
|
||||
v0.23, released on 23. Aug. 2019
|
||||
- Added generic circuits. Now it is possible to parameterize a sub circuit.
|
||||
|
@ -34,21 +34,23 @@ public class NetList implements Iterable<Net> {
|
||||
boolean hasLabel = false;
|
||||
for (VisualElement ve : circuit.getElements())
|
||||
if (ve.equalsDescription(Tunnel.DESCRIPTION)) {
|
||||
Vector pos = ve.getPos();
|
||||
Net found = null;
|
||||
for (Net n : netList)
|
||||
if (n.contains(pos))
|
||||
found = n;
|
||||
|
||||
String label = ve.getElementAttributes().get(Keys.NETNAME).trim();
|
||||
if (found == null) {
|
||||
final PinException e = new PinException(Lang.get("err_labelNotConnectedToNet_N", label), ve);
|
||||
e.setOrigin(circuit.getOrigin());
|
||||
throw e;
|
||||
}
|
||||
if (!label.isEmpty()) {
|
||||
Vector pos = ve.getPos();
|
||||
Net found = null;
|
||||
for (Net n : netList)
|
||||
if (n.contains(pos))
|
||||
found = n;
|
||||
|
||||
found.addLabel(label);
|
||||
hasLabel = true;
|
||||
if (found == null) {
|
||||
final PinException e = new PinException(Lang.get("err_labelNotConnectedToNet_N", label), ve);
|
||||
e.setOrigin(circuit.getOrigin());
|
||||
throw e;
|
||||
}
|
||||
|
||||
found.addLabel(label);
|
||||
hasLabel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasLabel)
|
||||
|
@ -298,7 +298,7 @@
|
||||
<string name="elem_Tunnel">Tunnel</string>
|
||||
<string name="elem_Tunnel_tt">Verbindet Elemente, ohne eine Leitung zu ziehen. Alle Tunnelelemente, welche denselben
|
||||
Netznamen tragen, sind miteinander verbunden. Der Tunnel ist immer lokal, es können keine Verbindungen über
|
||||
Schaltungsgrenzen hinaus erzeugt werden.</string>
|
||||
Schaltungsgrenzen hinaus erzeugt werden. Unbenannte Tunnel haben keine Funktion.</string>
|
||||
<string name="elem_Tunnel_pin_in">Anschluss des Tunnels.</string>
|
||||
<string name="elem_Splitter">Splitter</string>
|
||||
<string name="elem_Splitter_tt">Führt mehrere Leitungen zu einem gemeinsamen Bus zusammen, bzw. splittet diesen wieder auf.
|
||||
|
@ -302,7 +302,8 @@
|
||||
<string name="elem_Const_pin_out">Returns the given value as a constant.</string>
|
||||
<string name="elem_Tunnel">Tunnel</string>
|
||||
<string name="elem_Tunnel_tt">Connects components without a wire. All tunnel elements, which have the same net name,
|
||||
are connected together. Works only locally, so it is not possible to connect different circuits.</string>
|
||||
are connected together. Works only locally, so it is not possible to connect different circuits.
|
||||
Unnamed tunnels are ignored silently.</string>
|
||||
<string name="elem_Tunnel_pin_in">The connection to the tunnel.</string>
|
||||
<string name="elem_Splitter">Splitter</string>
|
||||
<string name="elem_Splitter_tt">Splits or creates a wire bundle or a data bus with more than one bit.
|
||||
|
Loading…
x
Reference in New Issue
Block a user