mirror of
https://github.com/dnlbauer/corax-keyboard.git
synced 2026-09-11 13:45:30 +00:00
mirror scrollwheel
This commit is contained in:
@@ -217,25 +217,15 @@ pcbs:
|
|||||||
# 8.275 is exactly above the pad
|
# 8.275 is exactly above the pad
|
||||||
shift: [-8.275, 1]
|
shift: [-8.275, 1]
|
||||||
scrollwheel:
|
scrollwheel:
|
||||||
what: scrollwheel
|
what: scrollwheel_mirrored
|
||||||
where: [scrollwheel]
|
where: [scrollwheel]
|
||||||
params:
|
params:
|
||||||
from: "{{column_net}}"
|
from: "{{column_net}}"
|
||||||
to: "{{colrow}}"
|
to: "{{colrow}}"
|
||||||
A: ENCB
|
A: ENCB_undef
|
||||||
B: GND
|
B: GND_ENCA
|
||||||
C: ENCA
|
C: ENCA_GND
|
||||||
D: scroolwheel_undefined
|
D: undef_ENCB
|
||||||
rotary:
|
|
||||||
what: rotary
|
|
||||||
where: [scrollwheel]
|
|
||||||
params:
|
|
||||||
from: "{{colrow}}"
|
|
||||||
to: "{{column_net}}"
|
|
||||||
A: ENCA
|
|
||||||
B: ENCB
|
|
||||||
C: GND
|
|
||||||
adjust.rotate: 90
|
|
||||||
scroll_diode:
|
scroll_diode:
|
||||||
what: diode
|
what: diode
|
||||||
where: [scrollwheel]
|
where: [scrollwheel]
|
||||||
@@ -243,7 +233,67 @@ pcbs:
|
|||||||
from: "{{colrow}}"
|
from: "{{colrow}}"
|
||||||
to: "{{row_net}}"
|
to: "{{row_net}}"
|
||||||
adjust:
|
adjust:
|
||||||
shift: [-5, 9]
|
shift: [-5, -9]
|
||||||
|
jumper_sw_left_a:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: B
|
||||||
|
to: ENCB_undef
|
||||||
|
from: ENCB
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, 3.81]
|
||||||
|
jumper_sw_left_gnd:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: B
|
||||||
|
to: GND_ENCA
|
||||||
|
from: GND
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, 1.27]
|
||||||
|
jumper_sw_left_ENCA:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: B
|
||||||
|
to: ENCA_GND
|
||||||
|
from: ENCA
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, -1.27]
|
||||||
|
jumper_sw_right_a:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: F
|
||||||
|
to: undef_ENCB
|
||||||
|
from: ENCB
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, -3.81]
|
||||||
|
jumper_sw_right_gnd:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: F
|
||||||
|
to: ENCA_GND
|
||||||
|
from: GND
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, -1.27]
|
||||||
|
jumper_sw_right_ENCA:
|
||||||
|
what: jumper
|
||||||
|
where: [scrollwheel]
|
||||||
|
params:
|
||||||
|
side: F
|
||||||
|
to: GND_ENCA
|
||||||
|
from: ENCA
|
||||||
|
adjust:
|
||||||
|
rotate: 90
|
||||||
|
shift: [-2, 1.27]
|
||||||
promicro:
|
promicro:
|
||||||
what: promicro
|
what: promicro
|
||||||
where: mcu
|
where: mcu
|
||||||
|
|||||||
91
ergogen/footprints/scrollwheel_mirrored.js
Normal file
91
ergogen/footprints/scrollwheel_mirrored.js
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
// Panasonic EVQWGD001 horizontal rotary encoder
|
||||||
|
//
|
||||||
|
// __________________
|
||||||
|
// (f) (t) | |
|
||||||
|
// | (1) | |
|
||||||
|
// | (2) | |
|
||||||
|
// | (3) | |
|
||||||
|
// | (4) | |
|
||||||
|
// |_( )___________|_|
|
||||||
|
//
|
||||||
|
// Nets
|
||||||
|
// from: corresponds to switch pin 1 (for button presses)
|
||||||
|
// to: corresponds to switch pin 2 (for button presses)
|
||||||
|
// A: corresponds to pin 1 (for rotary)
|
||||||
|
// B: corresponds to pin 2 (for rotary, should be GND)
|
||||||
|
// C: corresponds to pin 3 (for rotary)
|
||||||
|
// D: corresponds to pin 4 (for rotary, unused)
|
||||||
|
// Params
|
||||||
|
// reverse: default is false
|
||||||
|
// if true, will flip the footprint such that the pcb can be reversible
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
params: {
|
||||||
|
designator: 'S',
|
||||||
|
reverse: false,
|
||||||
|
from: undefined,
|
||||||
|
to: undefined,
|
||||||
|
A: undefined,
|
||||||
|
B: undefined,
|
||||||
|
C: undefined,
|
||||||
|
D: undefined
|
||||||
|
},
|
||||||
|
body: p => {
|
||||||
|
const standard = `
|
||||||
|
(module RollerEncoder_Panasonic_EVQWGD001 (layer F.Cu) (tedit 6040A10C)
|
||||||
|
${p.at /* parametric position */}
|
||||||
|
(fp_text reference REF** (at 0 0 ${p.rot}) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))))
|
||||||
|
(fp_text value RollerEncoder_Panasonic_EVQWGD001 (at -0.1 9 ${p.rot}) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))))
|
||||||
|
|
||||||
|
${'' /* corner marks */}
|
||||||
|
(fp_line (start -8.4 -6.4) (end 8.4 -6.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start 8.4 -6.4) (end 8.4 7.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start 8.4 7.4) (end -8.4 7.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start -8.4 7.4) (end -8.4 -6.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start -8.4 6.4) (end 8.4 6.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start 8.4 6.4) (end 8.4 -7.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start 8.4 -7.4) (end -8.4 -7.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
(fp_line (start -8.4 -7.4) (end -8.4 6.4) (layer Dwgs.User) (width 0.12))
|
||||||
|
|
||||||
|
`
|
||||||
|
function pins(def_neg, def_pos) {
|
||||||
|
return `
|
||||||
|
${'' /* edge cuts */}
|
||||||
|
(fp_line (start ${def_pos}9.8 7.3) (end ${def_pos}9.8 -7.3) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_line (start ${def_pos}7.4 -7.3) (end ${def_pos}7.4 7.3) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_line (start ${def_pos}9.5 -7.6) (end ${def_pos}7.7 -7.6) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_line (start ${def_pos}7.7 7.6) (end ${def_pos}9.5 7.6) (layer Edge.Cuts) (width 0.15))
|
||||||
|
|
||||||
|
(fp_arc (start ${def_pos}7.7 7.3) (end ${def_pos}7.4 7.3) (angle ${def_neg}90) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_arc (start ${def_pos}9.5 7.3) (end ${def_pos}9.5 7.6) (angle ${def_neg}90) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_arc (start ${def_pos}7.7 -7.3) (end ${def_pos}7.7 -7.6) (angle ${def_neg}90) (layer Edge.Cuts) (width 0.15))
|
||||||
|
(fp_arc (start ${def_pos}9.5 -7.3) (end ${def_pos}9.8 -7.3) (angle ${def_neg}90) (layer Edge.Cuts) (width 0.15))
|
||||||
|
|
||||||
|
${'' /* pins */}
|
||||||
|
(pad S1 thru_hole circle (at ${def_neg}6.85 -6.2 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.from.str})
|
||||||
|
(pad S2 thru_hole circle (at ${def_neg}5 -6.2 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.to.str})
|
||||||
|
(pad A thru_hole circle (at ${def_neg}5.625 -3.81 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.A.str})
|
||||||
|
(pad B thru_hole circle (at ${def_neg}5.625 -1.27 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.B.str})
|
||||||
|
(pad C thru_hole circle (at ${def_neg}5.625 1.27 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.C.str})
|
||||||
|
(pad D thru_hole circle (at ${def_neg}5.625 3.81 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.D.str})
|
||||||
|
|
||||||
|
${'' /* mirror pins */}
|
||||||
|
(pad S1 thru_hole circle (at ${def_neg}6.85 6.2 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.from.str})
|
||||||
|
(pad S2 thru_hole circle (at ${def_neg}5 6.2 ${p.rot}) (size 1.6 1.6) (drill 0.9) (layers *.Cu *.Mask) ${p.to.str})
|
||||||
|
`
|
||||||
|
}
|
||||||
|
if(p.reverse) {
|
||||||
|
return `
|
||||||
|
${standard}
|
||||||
|
${pins('-', '')}
|
||||||
|
${pins('', '-')})
|
||||||
|
`
|
||||||
|
} else {
|
||||||
|
return `
|
||||||
|
${standard}
|
||||||
|
${pins('-', '')})
|
||||||
|
`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user