fixed an issue with the input default values

This commit is contained in:
hneemann 2020-07-02 12:45:07 +02:00
parent 08865eb529
commit 001e85db68

View File

@ -60,14 +60,18 @@ public class In implements Element {
output = new ObservableValue("out", attributes.get(Keys.BITS)) output = new ObservableValue("out", attributes.get(Keys.BITS))
.setPinDescription(DESCRIPTION) .setPinDescription(DESCRIPTION)
.setPinNumber(pinNumber); .setPinNumber(pinNumber);
boolean highZ = attributes.get(Keys.IS_HIGH_Z) || value.isHighZ();
if (highZ) if (attributes.get(Keys.IS_HIGH_Z) || value.isHighZ())
output.setToHighZ().setBidirectional(); output.setBidirectional();
if (value.isHighZ())
output.setToHighZ();
else else
output.setValue(value.getValue()); output.setValue(value.getValue());
label = attributes.getLabel(); label = attributes.getLabel();
format = attributes.get(Keys.INT_FORMAT); format = attributes.get(Keys.INT_FORMAT);
showInGraph= attributes.get(Keys.ADD_VALUE_TO_GRAPH); showInGraph = attributes.get(Keys.ADD_VALUE_TO_GRAPH);
} }
@Override @Override