mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-15 07:48:29 -04:00
added common anode seven segment displays, see #298
This commit is contained in:
parent
e62b7d80f8
commit
27f4f49ac1
@ -102,19 +102,18 @@ public class SevenSegShape extends SevenShape {
|
|||||||
if (inputValues == null)
|
if (inputValues == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (persistence && commonConnection) {
|
if (commonConnection) {
|
||||||
if (!ccin.isHighZ() && !ccin.getBool())
|
boolean isHighZ = inputs[i].isHighZ() || ccin.isHighZ();
|
||||||
data[i] = inputs[i].getBool();
|
boolean on = (inputs[i].getBool() != ccin.getBool()) && (inputs[i].getBool() ^ anode);
|
||||||
return data[i];
|
if (persistence) {
|
||||||
} else {
|
if (!isHighZ)
|
||||||
if (commonConnection && (ccin.isHighZ() || (ccin.getBool() ^ anode)))
|
data[i] = on;
|
||||||
return false;
|
return data[i];
|
||||||
|
} else
|
||||||
|
return !isHighZ && on;
|
||||||
|
} else
|
||||||
|
return !inputs[i].isHighZ() && inputs[i].getBool();
|
||||||
|
|
||||||
if (inputs[i].isHighZ())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return inputs[i].getBool() ^ anode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user