Color logic gate pins by logical state (high/low)#288
Open
esaruoho wants to merge 1 commit intopfalstad:v3-devfrom
Open
Color logic gate pins by logical state (high/low)#288esaruoho wants to merge 1 commit intopfalstad:v3-devfrom
esaruoho wants to merge 1 commit intopfalstad:v3-devfrom
Conversation
Logic gate and chip pins are colored based on whether they are
above or below the logic threshold: high pins show in the positive
color, low pins show in the neutral color. Makes signal propagation
visually traceable in logic circuits.
This is a toggleable option ("Color Logic Pins by State") in
Other Options, persisted via localStorage. When disabled (the
default), pins use the existing voltage-gradient coloring.
Affected elements: GateElm (AND, OR, XOR, NAND, NOR, XNOR),
ChipElm (all digital chips), InverterElm, TriStateElm, and
DelayBufferElm.
Addresses sharpie7#369.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
why |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Affected elements
GateElm(AND, OR, XOR, NAND, NOR, XNOR and all subclasses)ChipElm(all digital chips: flip-flops, counters, shift registers, etc.)InverterElmTriStateElmDelayBufferElmImplementation details
CircuitElm.colorLogicPinsstatic boolean field, loaded from localStorage on startupCircuitElm.setLogicPinColor(g, volts, threshold)helper method that either applies logic-state coloring or falls back to the standardsetVoltageColor()when the option is disableddraw()method usessetLogicPinColor()instead ofsetVoltageColor()for pin leads, with the element's own threshold (typicallyhighVoltage * 0.5)ChipElmsubclasses (e.g.OpAmpElm) continue to use standard voltage coloringTest plan
Addresses sharpie7#369.
🤖 Generated with Claude Code