This commit is contained in:
parent
072f5bcf74
commit
30e11b4a1f
|
@ -112,7 +112,7 @@ with open(src_name + ".csv", 'rb') as src_f, open(dst_name + "-BOM.csv", 'w') as
|
||||||
# remove kicad library prefix from the footprint names (such as "hellen-one-common:")
|
# remove kicad library prefix from the footprint names (such as "hellen-one-common:")
|
||||||
footprint = re.sub(r"[^\:]+\:", "", footprint)
|
footprint = re.sub(r"[^\:]+\:", "", footprint)
|
||||||
bom[des] = footprint
|
bom[des] = footprint
|
||||||
print ("* " + des)
|
print ("* " + des + " " + footprint)
|
||||||
mod = pat_module.match(comment)
|
mod = pat_module.match(comment)
|
||||||
if mod:
|
if mod:
|
||||||
print ("*** Module detected!")
|
print ("*** Module detected!")
|
||||||
|
|
|
@ -294,6 +294,9 @@ def readFootprints(bomPath, cplPath, footprintsPath, yInvert):
|
||||||
fprint = readFootprint(fpname, footprintsPath, row[0])
|
fprint = readFootprint(fpname, footprintsPath, row[0])
|
||||||
# if the footprint is not found, we cannot add it to the iBOM
|
# if the footprint is not found, we cannot add it to the iBOM
|
||||||
if not fprint:
|
if not fprint:
|
||||||
|
if idx in bomlut:
|
||||||
|
bomlut.remove(idx)
|
||||||
|
del bom[row[0]]
|
||||||
continue
|
continue
|
||||||
footprints[fpname] = fprint
|
footprints[fpname] = fprint
|
||||||
fpr = copy.deepcopy(fprint)
|
fpr = copy.deepcopy(fprint)
|
||||||
|
@ -324,6 +327,9 @@ def readFootprints(bomPath, cplPath, footprintsPath, yInvert):
|
||||||
|
|
||||||
for b in bomlut:
|
for b in bomlut:
|
||||||
refs = b["refs"]
|
refs = b["refs"]
|
||||||
|
if len(refs) < 1:
|
||||||
|
print ("* Skipping DNP component: " + b["value"])
|
||||||
|
continue
|
||||||
bomItem = [
|
bomItem = [
|
||||||
len(refs),
|
len(refs),
|
||||||
b["value"],
|
b["value"],
|
||||||
|
|
Loading…
Reference in New Issue