Skip to content

Fix IPN parsing to accept alphanumeric variations#69

Merged
cbrake merged 2 commits into
mainfrom
cbrake/main
Jul 16, 2026
Merged

Fix IPN parsing to accept alphanumeric variations#69
cbrake merged 2 commits into
mainfrom
cbrake/main

Conversation

@cbrake

@cbrake cbrake commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

cbrake added 2 commits July 16, 2026 15:36
The variation segment often codes a value rather than a plain number: 02V5
for 2.5 V, 047n for 47 nH, 8R3m for 8.3 mOhm. reIpn matched four digits
only, so those parts failed to parse. Releasing one was refused, the KiCad
HTTP API served it without a category, and nextAvailableIPN skipped it when
computing the maximum N, which could hand out a number that already existed.

parse() now returns V as a string, since it is no longer always a number.
newIpnParts and v() took an int variation and had no callers, so they are
removed. extractCategory in kicad_api.go parses through the ipn type instead
of repeating the format regex.
@cbrake
cbrake merged commit 094e90c into main Jul 16, 2026
4 checks passed
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.

1 participant