Ergogen: Add knob visualization to rotary encoder footprint

This commit is contained in:
Lexi / Zoe 2024-08-01 23:54:37 +02:00
parent eec05917c1
commit 6bf16ac7fe
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,10 @@
// Modified version of rotary.js, without the mounting legs
// --------------------------------------------------------
// EC12 rotary encoder
//
// Params
// radius: radius of the knob in mm (only for visualization on User.Drawings)
//
// Nets
// from: corresponds to switch pin 1 (for button presses)
// to: corresponds to switch pin 2 (for button presses)
@ -57,6 +61,9 @@ module.exports = {
(fp_circle (center -0.12 -0.04) (end 2.88 -0.04) (layer F.SilkS) (width 0.12))
(fp_circle (center -0.12 -0.04) (end 2.88 -0.04) (layer F.Fab) (width 0.12))
${'' /* knob visualization */}
(fp_circle (center 0 0) (end ${p.radius} 0) (layer Dwgs.User) (width 0.1))
${''/* pin names */}
(pad A thru_hole rect (at -7.62 -2.54 ${p.r}) (size 2 2) (drill 1) (layers *.Cu *.Mask) ${p.A})
(pad C thru_hole circle (at -7.62 -0.04) (size 2 2) (drill 1) (layers *.Cu *.Mask) ${p.C})