Skip to content

fix: support imperial sizes for led and diode in string parser#618

Open
64johnlee wants to merge 2 commits into
tscircuit:mainfrom
64johnlee:fix/issue-562
Open

fix: support imperial sizes for led and diode in string parser#618
64johnlee wants to merge 2 commits into
tscircuit:mainfrom
64johnlee:fix/issue-562

Conversation

@64johnlee
Copy link
Copy Markdown

Summary

Fix for issue #562: String parser fails for led and diode with imperial sizes (e.g., led0402, diode0603)

The proxy handler only recognized res and cap for imperial sizing. This change adds led and diode so they also parse correctly as <fn><imperial_size> instead of being treated as pin counts.

Before: fp.string("led0402").circuitJson() → Error
After: fp.string("led0402").circuitJson() → Works correctly

Change

  • Modified src/footprinter.ts line 410: Added led and diode to the imperial size condition

Testing

All 410 tests pass.

Ralph and others added 2 commits May 3, 2026 11:12
Issue tscircuit#562: String parser fails for led and diode with imperial sizes

The proxy handler only recognized 'res' and 'cap' for imperial sizing.
Added 'led' and 'diode' to the condition so led0402, diode0603 etc.
now parse correctly instead of being treated as pin counts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant