Skip to content

fix(solderjumper): default num_pins to 2 when omitted - #800

Open
rudra496 wants to merge 1 commit into
tscircuit:mainfrom
rudra496:fix/solderjumper-default-pincount
Open

fix(solderjumper): default num_pins to 2 when omitted#800
rudra496 wants to merge 1 commit into
tscircuit:mainfrom
rudra496:fix/solderjumper-default-pincount

Conversation

@rudra496

Copy link
Copy Markdown

Summary

Fixes #784.

Previously, `solderjumper` expected `num_pins` without a fallback default. When parsed via bare string `fp.string("solderjumper")`, `num_pins` was `undefined`, leading to `NaN` pad spacing, 0 pads, and `NaN` coordinates across courtyard and silkscreen elements.

Changes

  1. Default Pin Count: Made `num_pins` optional in `solderjumper` params and defaulted to `2`.
  2. Unit Tests: Added `tests/solderjumper-bare-string.test.ts` verifying that bare string `solderjumper` emits 2 pads and finite courtyard/silkscreen geometry.

Verification

  • `bun test tests/solderjumper-bare-string.test.ts` (1/1 passing).

Fixes tscircuit#784 by defaulting num_pins to 2 in solderjumper footprint generator, preventing NaN values in courtyard and silkscreen coordinates when called by bare string.
Copilot AI lite review requested due to automatic review settings August 15, 2026 20:31
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

solderjumper without a pin count emits NaN geometry

2 participants