Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.3 #10

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions SparkFunKiCadPanelizer/panelizer/panelizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):

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

# Permutations for Ordering Instructions
possibleOrderingInstructions = [
Expand Down Expand Up @@ -428,7 +428,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
sparkxLogoSeen = False
solderMask = None
silkscreen = None
numLayers = "Layers: {}".format(board.GetCopperLayerCount())
copperLayers = "Layers: {}".format(board.GetCopperLayerCount()) # Should we trust the instructions or the tracks?!
controlledImpedance = None
finish = None
thickness = None
Expand Down Expand Up @@ -568,8 +568,8 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
if "mask" in line or "Mask" in line or "MASK" in line:
solderMask = line
if "layers" in line or "Layers" in line or "LAYERS" in line:
if numLayers is None: # Should we trust the instructions or the tracks?!
numLayers = line
if copperLayers is None: # Should we trust the instructions or the tracks?!
copperLayers = line
if "impedance" in line or "Impedance" in line or "IMPEDANCE" in line:
controlledImpedance = line
if "finish" in line or "Finish" in line or "FINISH" in line:
Expand All @@ -579,7 +579,10 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
if "material" in line or "Material" in line or "MATERIAL" in line:
material = line
if "weight" in line or "Weight" in line or "WEIGHT" in line or "oz" in line or "Oz" in line or "OZ" in line:
copperWeight = line
if copperWeight is None:
copperWeight = line
else:
copperWeight += "\n" + line
for extra in possibleExtras:
if extra in line:
if orderingExtras is None:
Expand Down Expand Up @@ -1188,9 +1191,9 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
if silkscreen is None:
silkscreen = "Silkscreen: White (Default)"
report += silkscreen + "\n"
if numLayers is None:
numLayers = "Layers: 2 (Default)"
report += numLayers + "\n"
if copperLayers is None:
copperLayers = "Layers: 2 (Default)"
report += copperLayers + "\n"
if finish is None:
finish = "Finish: HASL Lead-free (Default)"
report += finish + "\n"
Expand Down Expand Up @@ -1233,12 +1236,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
'Warning', wx.OK | wx.ICON_WARNING)
silkscreen = "Silkscreen: White (Default)"
oi.write(silkscreen + "\n")
if numLayers is None:
if copperLayers is None:
if wx.GetApp() is not None and orderingInstructionsSeen:
resp = wx.MessageBox("Number of layers not found!",
'Warning', wx.OK | wx.ICON_WARNING)
numLayers = "Layers: 2 (Default)"
oi.write(numLayers + "\n")
copperLayers = "Layers: 2 (Default)"
oi.write(copperLayers + "\n")
if finish is None:
if wx.GetApp() is not None and orderingInstructionsSeen:
resp = wx.MessageBox("PCB finish not found!",
Expand Down
2 changes: 1 addition & 1 deletion SparkFunKiCadPanelizer/resource/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.2"
__version__ = "1.1.3"
Loading