Add unpopulated option to additional components qty multiplier

Co-authored-by: Jeremy Ruhland (hatchery) <jeremy@goopypanther.org>

squash me
This commit is contained in:
Daniel Rojas 2025-03-01 17:09:08 +01:00
parent c376c491d4
commit e756d62e50
3 changed files with 3 additions and 1 deletions

View File

@ -408,6 +408,7 @@ Parts can be added to a connector or cable in the section `<additional-component
# when used in a connector:
# pincount number of pins of connector
# populated number of populated positions in a connector
# unpopulated number of unpopulated positions
# when used in a cable:
# wirecount number of wires of cable/bundle
# terminations number of terminations on a cable/bundle

View File

@ -31,7 +31,7 @@ BomCategory = IntEnum( # to enforce ordering in BOM
"BomEntry", "CONNECTOR CABLE WIRE ADDITIONAL_INSIDE ADDITIONAL_OUTSIDE"
)
QtyMultiplierConnector = Enum(
"QtyMultiplierConnector", "PINCOUNT POPULATED CONNECTIONS"
"QtyMultiplierConnector", "PINCOUNT POPULATED UNPOPULATED CONNECTIONS"
)
QtyMultiplierCable = Enum(
"QtyMultiplierCable", "WIRECOUNT TERMINATION LENGTH TOTAL_LENGTH"

View File

@ -450,6 +450,7 @@ class Connector(TopLevelGraphicalComponent):
qty_multipliers_computed = {
"PINCOUNT": self.pincount,
"POPULATED": num_populated_pins,
"UNPOPULATED": self.pincount - num_populated_pins,
"CONNECTIONS": num_connections,
}
for subitem in self.additional_components: