Don't include 'no-load' parts in vendor partslist
authorKeith Packard <keithp@keithp.com>
Fri, 7 Jun 2013 23:29:04 +0000 (16:29 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 7 Jun 2013 23:29:04 +0000 (16:29 -0700)
Make sure the partslist includes only components actually to be loaded
on the board.

Signed-off-by: Keith Packard <keithp@keithp.com>
scheme/gnet-partslist-bom.scm

index 718d76c60eea4f66eedd577105bd4ce750c8f9c3..d72c9e063c79e181316789278d2fbb8bf242379d 100644 (file)
    (lambda (package)
       (gnetlist:get-package-attribute package "vendor")))
 
+(define get-loadstatus
+   (lambda (package)
+      (gnetlist:get-package-attribute package "loadstatus")))
+  
 (define get-vendor-part-number
    (lambda (package)
       (gnetlist:get-package-attribute package "vendor_part_number")))
@@ -80,7 +84,7 @@
   (if (null? packages)
       '()
       (let ((package (car packages)))
-       (if (string=? (get-vendor package) vendor)
+       (if (and (not (string=? (get-loadstatus package) "noload")) (string=? (get-vendor package) vendor))
            (if (string=? (get-device package) "include")
                (get-parts-table-bom (cdr packages) vendor)
                (cons (list package