mirror of
https://github.com/dnlbauer/corax-keyboard.git
synced 2026-09-10 13:15:29 +00:00
add niceview
This commit is contained in:
@@ -111,7 +111,7 @@ points:
|
||||
scrollwheel:
|
||||
key:
|
||||
tags: [scrollwheel]
|
||||
shift: [px, -4]
|
||||
shift: [px, 0]
|
||||
column_net: col5
|
||||
width: scrollwheel_width
|
||||
height: scrollwheel_height
|
||||
@@ -218,7 +218,9 @@ pcbs:
|
||||
params:
|
||||
from: "{{colrow}}"
|
||||
to: "{{row_net}}"
|
||||
adjust.shift: [-3, 10]
|
||||
adjust:
|
||||
shift: [-3, -12]
|
||||
rotate: 180
|
||||
rotary:
|
||||
what: rotary
|
||||
where: [scrollwheel]
|
||||
@@ -250,3 +252,15 @@ pcbs:
|
||||
P14: col3
|
||||
P16: col4
|
||||
P10: col5
|
||||
niceview:
|
||||
what: niceview
|
||||
where: mcu
|
||||
adjust:
|
||||
shift: [18, 0]
|
||||
rotate: 180
|
||||
params:
|
||||
outline: true
|
||||
side: 'F'
|
||||
SDA: SDA
|
||||
SCL: SCL
|
||||
CS: CS
|
||||
52
ergogen/footprints/niceview.js
Normal file
52
ergogen/footprints/niceview.js
Normal file
@@ -0,0 +1,52 @@
|
||||
module.exports = {
|
||||
params: {
|
||||
designator: 'Nice!View',
|
||||
side: 'F',
|
||||
outline: false,
|
||||
VCC: { type: 'net', value: 'VCC' },
|
||||
GND: { type: 'net', value: 'GND' },
|
||||
SDA: undefined,
|
||||
SCL: undefined,
|
||||
CS: undefined,
|
||||
},
|
||||
body: p => {
|
||||
const standard = `
|
||||
(module lib:niceview_headers (layer F.Cu) (tedit 648E0265)
|
||||
${p.at /* parametric position */}
|
||||
|
||||
${'' /* footprint reference */}
|
||||
(fp_text reference "${p.ref}" (at -1.6 0) (layer F.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
|
||||
(fp_text value "" (at 0 0) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))))
|
||||
|
||||
${'' /* pins */}
|
||||
(pad 4 thru_hole oval (at 0.0 -5.08 ${p.rot + 270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
|
||||
${p.SDA.str})
|
||||
(pad 3 thru_hole oval (at 0.0 -2.54 ${p.rot + 270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
|
||||
${p.SCL.str})
|
||||
(pad 2 thru_hole oval (at 0.0 0.00 ${p.rot + 270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
|
||||
${p.VCC.str})
|
||||
(pad 1 thru_hole rect (at 0.0 2.54 ${p.rot + 270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
|
||||
${p.GND.str})
|
||||
(pad 1 thru_hole oval (at 0.0 5.08 ${p.rot + 270}) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
|
||||
${p.CS.str})
|
||||
`
|
||||
function outline() {
|
||||
return `
|
||||
${'' /* Nice!View outline */}
|
||||
(fp_line (start -1.25 -7) (end -1.25 7) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.25 7) (end 34.75 7) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 34.75 7) (end 34.75 -7) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 34.75 -7) (end -1.25 -7) (layer F.SilkS) (width 0.15))
|
||||
`
|
||||
}
|
||||
if (p.outline) {
|
||||
return `
|
||||
${standard}
|
||||
${outline()})
|
||||
`
|
||||
} else {
|
||||
return `${standard})`
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user