Skip to content

fix: parse pin count from jst_ph_X and jst_sh_X footprint strings#513

Open
quantbitrealmSimon wants to merge 1 commit intotscircuit:mainfrom
quantbitrealmSimon:fix/jst-ph-pin-count
Open

fix: parse pin count from jst_ph_X and jst_sh_X footprint strings#513
quantbitrealmSimon wants to merge 1 commit intotscircuit:mainfrom
quantbitrealmSimon:fix/jst-ph-pin-count

Conversation

@quantbitrealmSimon
Copy link

Fixes #495

Problem

The jst_ph_X and jst_sh_X footprint string formats (e.g., jst_ph_4) were not correctly parsing the pin count because the regex only matched jst followed immediately by digits.

Solution

Added a new regex pattern to handle the variant format with the pin count after the variant specifier:

  • jst_ph_4, jst_sh_6 (with underscore before number)
  • jst_ph4, jst_sh6 (without underscore)

Existing formats like jst2_ph and jst4_sh continue to work.

Testing

  • jst_ph_4 now correctly generates 4 pads
  • jst2_ph still correctly generates 2 pads
  • jst4_sh still correctly generates 4 pads

/claim

Fixes tscircuit#495

The jst_ph_X and jst_sh_X footprint string formats (e.g., jst_ph_4)
were not correctly parsing the pin count because the regex only
matched jst followed immediately by digits.

This fix adds a new regex pattern to handle the variant format:
- jst_ph_4, jst_sh_6 (with underscore before number)
- jst_ph4, jst_sh6 (without underscore)

Existing formats like jst2_ph and jst4_sh continue to work.
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.

jst_ph_4 footprint generates only 2 pads instead of 4

2 participants