Maybe needs review: fixed bug in ManualSwitch concerning the input
authorChristian Femers <femers@in.tum.de>
Mon, 2 Sep 2019 07:39:30 +0000 (09:39 +0200)
committerChristian Femers <femers@in.tum.de>
Mon, 2 Sep 2019 07:39:30 +0000 (09:39 +0200)
commit9b34381259d5e6cb46bd3834712311cd60317506
treedcd19d098d5e1b242457fbb4f179f9612cd396ab
parentff8f3e75025958484dd10ebd380d1b62eb393396
Maybe needs review: fixed bug in ManualSwitch concerning the input

The problem was, that the method getInputValues() did not really return
the current input values, but the last ones that already reached the
wire. This means that different value ranges could not be combined,
since the method already returned the some time ago successfully inputed
values.
This could also cause Problems with setState, since this method used to
compare the argument against the values inputed on the wire, but not
some feedSignals call that is sill due in the Timeline. Therefore a
value change might be discarded although it might actually change the
values again (back):

new: 1010 --- (still in Timeline: 0000) --- already set: 1010

The old method would not have noticed this and ignored the new values.

It is possible, that there are more bugs like this in logic core.
net.mograsim.logic.core/src/net/mograsim/logic/core/components/ManualSwitch.java