Skip to content

Commit

Permalink
pre_update: Honor 'board_only' (Not in schematic) footprint property.
Browse files Browse the repository at this point in the history
It is quite common, to add footprints to a PCB, without adding it to the
schematic. Think Logo's or 'duplicate' connectors etc. KiCad has a flag
called 'Not in schematic' for this purpose. Lets check if this flag is
set in the PCB, and ignore any errors from this if applicable.

Fixes: #558.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
  • Loading branch information
oliv3r committed Jan 17, 2024
1 parent 39e310e commit 3fc1947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This limitation isn't found on KiCad 7. (#486)
- *exclude_from_bom* mismatch on KiCad 7
- *Sheetfile* mismatch on KiCad 7 when testing from different directory
- Honor the 'Not in schematic' (board_only) flag when doing a parity check
- Dependencies downloader:
- Problems when connection timed-out
- Sub PCB separation using annotation method for some edeges and KiCad
Expand Down
3 changes: 2 additions & 1 deletion kibot/pre_update_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def check_components(self, comps, errors):
logger.warning(W_NOTINBOM+f"{ref} excluded from BoM we can't check its parity, upgrade to KiCad 7")
excluded.add(ref)
else:
errors.append('{} found in PCB, but not in schematic'.format(ref))
if not m.GetAttributes() & MOD_BOARD_ONLY:

Check failure on line 89 in kibot/pre_update_xml.py

View workflow job for this annotation

GitHub Actions / pre-commit

pre_update_xml.py: F821 undefined name 'MOD_BOARD_ONLY'
errors.append('{} found in PCB, but not in schematic'.format(ref))
continue
sch_data = comps[ref]
pcb_fp = m.GetFPIDAsString()
Expand Down

0 comments on commit 3fc1947

Please sign in to comment.