-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Summary
The jst_ph_4 footprint (JST PH connector with 4 pins) only generates 2 pads instead of 4.
Root Cause
In src/fn/jst.ts:
-
Line 169 hardcodes
numPins = 2for the PH variant:let numPins = variant === "sh" ? 4 : 2
-
The SH variant parses pin count from the string (e.g.,
jst_sh6→ 6 pins), but PH does not. -
The
generatePads()function for PH (lines 84-105) only creates 2 pads at fixed positions, ignoring thenumPinsparameter entirely.
Reproduction
<chip name="J1" footprint="jst_ph_4" />Export to KiCad PCB - only 2 pads are generated.
Expected
4 through-hole pads for jst_ph_4, similar to how jst_sh6 generates 6 pads.
Suggested Fix
- Parse pin count from the footprint string for PH variant (e.g.,
jst_ph_4→ 4 pins) - Update
generatePads()to dynamically createnumPinspads for the PH variant
Impact
JST PH connectors with more than 2 pins cannot be used via the built-in footprint string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels