Skip to content

Commit

Permalink
fix: designator seperator
Browse files Browse the repository at this point in the history
  • Loading branch information
bennymeg committed Jun 29, 2022
1 parent 966f96c commit a84c8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
"versions": [
{
"version": "0.3.1",
"version": "0.3.2",
"status": "testing",
"kicad_version": "6.00"
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def run(self):
footprint_designators[footprint.GetReference()] -= 1

components.append({
'Designator': "{}_{}".format(footprint.GetReference(), unique_id),
'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id),
'Mid X': (footprint.GetPosition()[0] - board.GetDesignSettings().GetAuxOrigin()[0]) / 1000000.0,
'Mid Y': (footprint.GetPosition()[1] - board.GetDesignSettings().GetAuxOrigin()[1]) * -1.0 / 1000000.0,
'Rotation': footprint.GetOrientation() / 10.0,
Expand All @@ -144,7 +144,7 @@ def run(self):
# todo: merge similar parts into single entry

bom.append({
'Designator': "{}_{}".format(footprint.GetReference(), unique_id),
'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id),
'Footprint': footprint_name,
'Quantity': 1,
'Value': footprint.GetValue(),
Expand Down

0 comments on commit a84c8e4

Please sign in to comment.