Skip to content

Comments

Fix JST PH footprint to generate correct number of pads#497

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

Fix JST PH footprint to generate correct number of pads#497
BoozeLee wants to merge 1 commit intotscircuit:mainfrom
BoozeLee:fix/jst-ph-pin-count

Conversation

@BoozeLee
Copy link

@BoozeLee BoozeLee commented Feb 8, 2026

  • Parse pin count from footprint string (e.g., jst_ph_4 → 4 pins)
  • Update generatePads() to dynamically create pads for PH variant
  • Add tests for jst_ph_4 and jst_ph_6 footprints

Fixes #495

Before: jst_ph_4 only generated 2 pads (hardcoded)
After: jst_ph_4 correctly generates 4 pads
/claim #495

- Parse pin count from footprint string (e.g., jst_ph_4 → 4 pins)
- Update generatePads() to dynamically create pads for PH variant
- Add tests for jst_ph_4 and jst_ph_6 footprints

Fixes tscircuit#495

Before: jst_ph_4 only generated 2 pads (hardcoded)
After: jst_ph_4 correctly generates 4 pads

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@BoozeLee
Copy link
Author

BoozeLee commented Feb 8, 2026

Hi @seveibar! 👋

This PR fixes the bug reported in #495 where JST PH
footprints with more than 2 pins were only
generating 2 pads.

The fix:

  • ✅ Parses pin count from footprint strings (e.g.,
    jst_ph_4 → 4 pins)
  • ✅ All 356 tests passing (added 2 new tests)
  • ✅ Follows the same pattern as JST SH variant

Would it be possible to add a bounty to #495? This
was a clear bug with a well-defined solution, and
I'd love to continue contributing to tscircuit! 🚀

Thanks for maintaining such a great project!

@BoozeLee
Copy link
Author

Following up on the inquiry regarding a bounty for issue #495. This PR (labeled 'Bounty claim') is open. Please advise on the bounty status or next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jst_ph_4 footprint generates only 2 pads instead of 4

1 participant