Skip to content

Commit fdfaeb9

Browse files
authored
Merge pull request #10 from sparkfun/release_candidate
v1.1.3
2 parents f611e73 + 8d9fefb commit fdfaeb9

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

SparkFunKiCadPanelizer/panelizer/panelizer.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
126126

127127
# 'Extra' ordering instructions
128128
# Any PCB_TEXT containing any of these keywords will be copied into the ordering instructions
129-
possibleExtras = ['clean', 'Clean', 'CLEAN']
129+
possibleExtras = ['clean', 'Clean', 'CLEAN', 'stackup', 'Stackup', 'STACKUP']
130130

131131
# Permutations for Ordering Instructions
132132
possibleOrderingInstructions = [
@@ -428,7 +428,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
428428
sparkxLogoSeen = False
429429
solderMask = None
430430
silkscreen = None
431-
numLayers = "Layers: {}".format(board.GetCopperLayerCount())
431+
copperLayers = "Layers: {}".format(board.GetCopperLayerCount()) # Should we trust the instructions or the tracks?!
432432
controlledImpedance = None
433433
finish = None
434434
thickness = None
@@ -568,8 +568,8 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
568568
if "mask" in line or "Mask" in line or "MASK" in line:
569569
solderMask = line
570570
if "layers" in line or "Layers" in line or "LAYERS" in line:
571-
if numLayers is None: # Should we trust the instructions or the tracks?!
572-
numLayers = line
571+
if copperLayers is None: # Should we trust the instructions or the tracks?!
572+
copperLayers = line
573573
if "impedance" in line or "Impedance" in line or "IMPEDANCE" in line:
574574
controlledImpedance = line
575575
if "finish" in line or "Finish" in line or "FINISH" in line:
@@ -579,7 +579,10 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
579579
if "material" in line or "Material" in line or "MATERIAL" in line:
580580
material = line
581581
if "weight" in line or "Weight" in line or "WEIGHT" in line or "oz" in line or "Oz" in line or "OZ" in line:
582-
copperWeight = line
582+
if copperWeight is None:
583+
copperWeight = line
584+
else:
585+
copperWeight += "\n" + line
583586
for extra in possibleExtras:
584587
if extra in line:
585588
if orderingExtras is None:
@@ -1188,9 +1191,9 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
11881191
if silkscreen is None:
11891192
silkscreen = "Silkscreen: White (Default)"
11901193
report += silkscreen + "\n"
1191-
if numLayers is None:
1192-
numLayers = "Layers: 2 (Default)"
1193-
report += numLayers + "\n"
1194+
if copperLayers is None:
1195+
copperLayers = "Layers: 2 (Default)"
1196+
report += copperLayers + "\n"
11941197
if finish is None:
11951198
finish = "Finish: HASL Lead-free (Default)"
11961199
report += finish + "\n"
@@ -1233,12 +1236,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
12331236
'Warning', wx.OK | wx.ICON_WARNING)
12341237
silkscreen = "Silkscreen: White (Default)"
12351238
oi.write(silkscreen + "\n")
1236-
if numLayers is None:
1239+
if copperLayers is None:
12371240
if wx.GetApp() is not None and orderingInstructionsSeen:
12381241
resp = wx.MessageBox("Number of layers not found!",
12391242
'Warning', wx.OK | wx.ICON_WARNING)
1240-
numLayers = "Layers: 2 (Default)"
1241-
oi.write(numLayers + "\n")
1243+
copperLayers = "Layers: 2 (Default)"
1244+
oi.write(copperLayers + "\n")
12421245
if finish is None:
12431246
if wx.GetApp() is not None and orderingInstructionsSeen:
12441247
resp = wx.MessageBox("PCB finish not found!",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.1.2"
1+
__version__ = "1.1.3"

0 commit comments

Comments
 (0)