Footprint parameter flattening done

This commit is contained in:
Bán Dénes 2022-12-04 18:40:06 +01:00
parent 3a0f326a31
commit 58bb16ed28
31 changed files with 316 additions and 350 deletions

View file

@ -1,13 +1,11 @@
module.exports = {
nets: {
SDA: undefined,
SCL: undefined,
VCC: 'VCC',
GND: 'GND'
},
params: {
class: 'OLED',
side: 'F'
designator: 'OLED',
side: 'F',
VCC: {type: 'net', value: 'VCC'},
GND: {type: 'net', value: 'GND'},
SDA: undefined,
SCL: undefined
},
body: p => `
(module lib:OLED_headers (layer F.Cu) (tedit 5E1ADAC2)
@ -19,13 +17,13 @@ module.exports = {
${'' /* pins */}
(pad 4 thru_hole oval (at 1.6 2.18 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.net.SDA.str})
${p.SDA.str})
(pad 3 thru_hole oval (at 1.6 4.72 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.net.SCL.str})
${p.SCL.str})
(pad 2 thru_hole oval (at 1.6 7.26 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.net.VCC.str})
${p.VCC.str})
(pad 1 thru_hole rect (at 1.6 9.8 ${p.rot+270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
${p.net.GND.str})
${p.GND.str})
)
`
}