simplified AbstractBusHandler.java

This commit is contained in:
hneemann 2018-03-05 14:22:06 +01:00
parent 0f767fee52
commit edb26aa362

View File

@ -83,16 +83,14 @@ public abstract class AbstractBusHandler {
highz &= input.getHighZ();
value |= input.getValue();
}
value &= ~highz;
// check for a burn!
// check for a burn condition!
for (ObservableValue input : getInputs()) {
long bothDefine = ~(highz | input.getHighZ());
if ((value & bothDefine) != (input.getValue() & bothDefine))
burn = State.burn;
}
if (highz != 0) {
switch (getResistor()) {
case pullUp:
set(value | highz, 0);
@ -103,8 +101,6 @@ public abstract class AbstractBusHandler {
default:
set(value, highz);
}
} else
set(value, 0);
}
// if burn condition and not yet added for post step check add for post step check