added more doc to Timeline; added functionality to Bit
[Mograsim.git] / era.mi / src / era / mi / logic / tests / Connector.java
index d59ee8c..fcdf6e8 100644 (file)
@@ -15,7 +15,7 @@ public class Connector implements WireArrayObserver
        public Connector(WireArray a, WireArray b)
        {
                if (a.length != b.length)
-                       throw new IllegalArgumentException("WireArray width does not match: " + a.length + ", " + b.length);
+                       throw new IllegalArgumentException(String.format("WireArray width does not match: %o, %o", a.length, b.length));
                this.a = a;
                this.b = b;
                a.addObserver(this);
@@ -30,9 +30,9 @@ public class Connector implements WireArrayObserver
                Simulation.TIMELINE.addEvent((e) ->
                {
                        if (initiator == a)
-                               bI.feedSignals(a.getValues());
+                               bI.feedSignals(aI.wireValuesExcludingMe());
                        else
-                               aI.feedSignals(b.getValues());
+                               aI.feedSignals(bI.wireValuesExcludingMe());
                }, 1);
        }
 }