Skip to content

Commit 9309709

Browse files
authored
Merge pull request #4 from sparkfun/release_candidate
v1.1.0 - breaking changes to make the Generator compatible with KiCad 8
2 parents d8592cd + 24e00eb commit 9309709

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

SparkFunKiCadBOMGenerator/plugin.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ def __init__(self):
3838

3939
self.kicad_build_version = pcbnew.GetBuildVersion()
4040

41-
def IsVersion(self, VersionStr):
42-
for v in VersionStr:
43-
if v in self.kicad_build_version:
44-
return True
45-
return False
46-
4741
def Run(self):
4842
if self._pcbnew_frame is None:
4943
try:
@@ -83,10 +77,9 @@ def Run(self):
8377
name = name.split(":")[1]
8478
prod_id = ""
8579
hasProdID = False
86-
if hasattr(sourceModule, "HasProperty"):
87-
if sourceModule.HasProperty("PROD_ID"):
88-
prod_id = sourceModule.GetPropertyNative("PROD_ID")
89-
hasProdID = True
80+
if sourceModule.HasFieldByName("PROD_ID"): # Breaking change for KiCad 8
81+
prod_id = sourceModule.GetFieldText("PROD_ID") # Breaking change for KiCad 8
82+
hasProdID = True
9083
if hasProdID:
9184
if prod_id == "":
9285
prod_id = ">> EMPTY <<"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.3"
1+
__version__ = "1.1.0"

pcm/metadata_template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://go.kicad.org/pcm/schemas/v1",
33
"name": "SparkFun KiCad BOM Generator",
4-
"description": "SparkFun's simple PCB BOM generator for KiCad 7",
4+
"description": "SparkFun's simple PCB BOM generator for KiCad 7 / 8",
55
"description_full": "Generates the SparkFun Bill Of Materials for a KiCad 7 PCB or panel",
66
"identifier": "com.github.sparkfun.SparkFunKiCadBOMGenerator",
77
"type": "plugin",

0 commit comments

Comments
 (0)