From 3fc1947fcf6ebff77fc4f41bb850176c92e12eec Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Wed, 17 Jan 2024 12:35:27 +0100 Subject: [PATCH] pre_update: Honor 'board_only' (Not in schematic) footprint property. 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 --- CHANGELOG.md | 1 + kibot/pre_update_xml.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42070e11..348d0fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/kibot/pre_update_xml.py b/kibot/pre_update_xml.py index 3df64a84..4903276d 100644 --- a/kibot/pre_update_xml.py +++ b/kibot/pre_update_xml.py @@ -86,7 +86,8 @@ class Update_XML(BasePreFlight): # noqa: F821 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: + errors.append('{} found in PCB, but not in schematic'.format(ref)) continue sch_data = comps[ref] pcb_fp = m.GetFPIDAsString()