From 74faf03ae34496e4b8dcff0e6bdad14bc1e51a92 Mon Sep 17 00:00:00 2001 From: Marco Massarelli Date: Fri, 5 May 2023 15:44:29 -0400 Subject: [PATCH] Add reset switch --- ergogen/config.yaml | 10 +++++ ergogen/footprints/reset_switch.js | 41 +++++++++++++++++++++ ergogen/output/pcbs/corney_island.kicad_pcb | 33 +++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 ergogen/footprints/reset_switch.js diff --git a/ergogen/config.yaml b/ergogen/config.yaml index 9fabf4e..80451d6 100644 --- a/ergogen/config.yaml +++ b/ergogen/config.yaml @@ -360,6 +360,16 @@ pcbs: shift: [0.5 ks + 4.16, 0.5 kp -0.125 kp - 19.3 - 22.65] rotate: 90 + reset_switch: + what: reset_switch + where: matrix_inner_top + params: + from: RST + to: GND + adjust: + shift: [0.5 ks + 18, 0.5 kp -0.125 kp - 19.3 - 20.65] + rotate: -90 + trrs: what: trrs where: matrix_inner_top diff --git a/ergogen/footprints/reset_switch.js b/ergogen/footprints/reset_switch.js new file mode 100644 index 0000000..7036a6a --- /dev/null +++ b/ergogen/footprints/reset_switch.js @@ -0,0 +1,41 @@ +module.exports = { + params: { + designator: 'B', // for Button + side: 'F', + from: undefined, + to: undefined + }, + body: p => ` + (module kbd:ResetSW (layer F.Cu) (tedit 5B9559E6) (tstamp 61905781) + + (descr "Two pin through hole Tactile Switch, the same as on the Corne") + (tags "Tactile Switch") + + ${p.at /* parametric position */} + ${'' /* footprint reference */} + (fp_text reference "${p.ref}" (at 0 2.55) (layer F.SilkS) ${p.ref_hide} (effects (font (size 1 1) (thickness 0.15)))) + (fp_text value "" (at 0 -2.55) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15)))) + + ${'' /* outline */} + (fp_text user RESET (at 0 0 ${p.rot}) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15)))) + (fp_text user RESET (at 0.127 0 ${p.rot}) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror))) + + (fp_line (start 3 1.5) (end 3 1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start 3 1.75) (end -3 1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end -3 1.5) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 -1.5) (end -3 -1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end 3 -1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start 3 -1.75) (end 3 -1.5) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end 3 1.75) (layer F.SilkS) (width 0.15)) + (fp_line (start 3 1.75) (end 3 1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end -3 1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end -3 -1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end 3 -1.75) (layer F.SilkS) (width 0.15)) + (fp_line (start 3 -1.75) (end 3 -1.5) (layer F.SilkS) (width 0.15)) + + ${'' /* pins */} + (pad 2 thru_hole circle (at -3.25 0 ${p.rot}) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) ${p.from.str}) + (pad 1 thru_hole circle (at 3.25 0 ${p.rot}) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) ${p.to.str}) + ) + ` +} \ No newline at end of file diff --git a/ergogen/output/pcbs/corney_island.kicad_pcb b/ergogen/output/pcbs/corney_island.kicad_pcb index 9bad529..d6ebab2 100644 --- a/ergogen/output/pcbs/corney_island.kicad_pcb +++ b/ergogen/output/pcbs/corney_island.kicad_pcb @@ -3770,6 +3770,39 @@ ) + (module kbd:ResetSW (layer F.Cu) (tedit 5B9559E6) (tstamp 61905781) + + (descr "Two pin through hole Tactile Switch, the same as on the Corne") + (tags "Tactile Switch") + + (at 222.5 92.45 -90) + + (fp_text reference "B1" (at 0 2.55) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15)))) + (fp_text value "" (at 0 -2.55) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15)))) + + + (fp_text user RESET (at 0 0 -90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15)))) + (fp_text user RESET (at 0.127 0 -90) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror))) + + (fp_line (start 3 1.5) (end 3 1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start 3 1.75) (end -3 1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end -3 1.5) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 -1.5) (end -3 -1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end 3 -1.75) (layer B.SilkS) (width 0.15)) + (fp_line (start 3 -1.75) (end 3 -1.5) (layer B.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end 3 1.75) (layer F.SilkS) (width 0.15)) + (fp_line (start 3 1.75) (end 3 1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 1.75) (end -3 1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end -3 -1.5) (layer F.SilkS) (width 0.15)) + (fp_line (start -3 -1.75) (end 3 -1.75) (layer F.SilkS) (width 0.15)) + (fp_line (start 3 -1.75) (end 3 -1.5) (layer F.SilkS) (width 0.15)) + + + (pad 2 thru_hole circle (at -3.25 0 -90) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) (net 33 "RST")) + (pad 1 thru_hole circle (at 3.25 0 -90) (size 2 2) (drill 1.3) (layers *.Cu *.Mask F.SilkS) (net 32 "GND")) + ) + + (module TRRS-PJ-320A-dual (layer F.Cu) (tedit 5970F8E5)