fix: parse pin count from sh variant in JST footprints#611
Open
64johnlee wants to merge 3 commits into
Open
Conversation
added 2 commits
April 29, 2026 01:02
Issue tscircuit#562 - String parser fails for led and diode with imperial sizes. The fix adds 'led' and 'diode' to the list of passive footprints that use imperial/metric sizing (alongside res and cap).
Issue tscircuit#495 - jst_ph_4 footprint generates only 2 pads instead of 4 Added shMatch to parse pin count from SH variant string, e.g., jst_ph_4 extracts 4 pins. Previously only ZH variant parsed pin count from string.
techmannih2
approved these changes
Apr 28, 2026
Contributor
techmannih2
left a comment
There was a problem hiding this comment.
fix format check, rest lgtm
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
Fix Issue #495 - jst_ph_4 footprint generates only 2 pads instead of 4
Problem: The JST footprint parser only parsed pin count from the string for ZH variant, not for SH variant. This meant
jst_ph_4would fail to parse the 4 pins.Solution: Added
shMatchregex to parse pin count from SH variant string, e.g.,jst_ph_4extracts 4 pins.Testing
jst_ph_4now correctly generates 4 padsjst_ph_2still works correctly (2 pads)