From f7e5eacd20e6a9346fe92b81515daadb8d1241fa Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 18 Oct 2023 02:33:03 +0000 Subject: [PATCH] refactor: Update boards/shields for encoders. * Update existing boards/shields for new `steps` and `triggers-per-rotation` set up. --- app/boards/arm/bdn9/bdn9_rev2.dts | 7 ++++--- app/boards/arm/bt60/bt60.dtsi | 5 +++-- app/boards/arm/ckp/ckp.dtsi | 9 +++++---- app/boards/shields/knob_goblin/knob_goblin.overlay | 7 ++++--- app/boards/shields/kyria/kyria_common.dtsi | 7 ++++--- app/boards/shields/lily58/lily58.dtsi | 5 +++-- app/boards/shields/lotus58/lotus58.dtsi | 7 ++++--- app/boards/shields/murphpad/murphpad.overlay | 4 ++-- app/boards/shields/nibble/nibble.keymap | 1 + app/boards/shields/nibble/nibble.overlay | 2 +- app/boards/shields/reviung5/reviung5.overlay | 5 +++-- app/boards/shields/romac_plus/romac_plus.dtsi | 5 +++-- app/boards/shields/snap/snap.dtsi | 4 ++-- app/boards/shields/snap/snap.keymap | 1 + app/boards/shields/sofle/sofle.dtsi | 7 ++++--- .../splitkb_aurora_corne/splitkb_aurora_corne.dtsi | 7 ++++--- .../splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi | 7 ++++--- .../splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi | 11 ++++++----- app/boards/shields/tidbit/tidbit.dtsi | 10 +++++----- app/boards/shields/tidbit/tidbit.keymap | 1 + app/boards/shields/zodiark/zodiark.dtsi | 7 ++++--- 21 files changed, 68 insertions(+), 51 deletions(-) diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index d2d1c65cb8f8..1b85067ce135 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -43,7 +43,7 @@ label = "LEFT_ENCODER"; a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; mid_encoder: encoder_mid { @@ -51,7 +51,7 @@ label = "MID_ENCODER"; a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { @@ -59,7 +59,7 @@ label = "RIGHT_ENCODER"; a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -67,6 +67,7 @@ compatible = "zmk,keymap-sensors"; status = "disabled"; sensors = <>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 6e4900af53c3..8a2702509576 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -22,9 +22,10 @@ zmk,matrix_transform = &default_transform; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; @@ -34,7 +35,7 @@ label = "LEFT_ENCODER"; a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index 6c52d620367f..ec2bd6a87b62 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -26,9 +26,10 @@ zmk,battery = &vbatt; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1>; + triggers-per-rotation = <20>; }; kscan0: kscan_0 { @@ -76,7 +77,7 @@ label = "ENCODER_ONE"; a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -85,7 +86,7 @@ label = "ENCODER_TWO"; a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -94,7 +95,7 @@ label = "encoder_3"; a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/shields/knob_goblin/knob_goblin.overlay b/app/boards/shields/knob_goblin/knob_goblin.overlay index d3ba8c5be795..03051ce58208 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.overlay +++ b/app/boards/shields/knob_goblin/knob_goblin.overlay @@ -39,7 +39,7 @@ label = "TOP_ENCODER"; a-gpios = <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -48,13 +48,14 @@ label = "BOTTOM_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&top_encoder &bottom_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 2e10cd37df46..1056794d5848 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -23,20 +23,21 @@ left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; // TODO: RGB node(s) diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index ec520f6bb8ab..eb427a581ba1 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -51,12 +51,13 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index e24d75e70d49..8b1c66f98df9 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7 label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7 label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index 13905092e647..f175c55e1c03 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -39,7 +39,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -48,7 +48,7 @@ label = "Encoder 2"; a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index 5b90f6c19ae0..4cb6f5b021a5 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -12,6 +12,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index cd1176401b79..43be6c766fcc 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -18,7 +18,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/shields/reviung5/reviung5.overlay b/app/boards/shields/reviung5/reviung5.overlay index 24b0f582b0e0..8b8852454851 100644 --- a/app/boards/shields/reviung5/reviung5.overlay +++ b/app/boards/shields/reviung5/reviung5.overlay @@ -43,12 +43,13 @@ label = "encoder"; a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder>; + triggers-per-rotation = <20>; }; }; \ No newline at end of file diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 71ec87b2b947..5324174b54f1 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -43,13 +43,14 @@ RC(3,0) RC(3,1) RC(3,2) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; // TODO: per-key RGB node(s)? diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index a374ad1768b5..7523f35b06c9 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -16,14 +16,14 @@ left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index 7c750f9f14c8..febaff97bba1 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -13,6 +13,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 71dc04d87a1b..4917ca321edf 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi index a1b7b64382c8..3eefdc6aeed0 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -48,7 +48,7 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 left_encoder: left_encoder { compatible = "alps,ec11"; label = "L_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 4 GPIO_PULL_UP>; @@ -58,16 +58,17 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 right_encoder: right_encoder { compatible = "alps,ec11"; label = "R_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 19 GPIO_PULL_UP>; b-gpios = <&pro_micro 18 GPIO_PULL_UP>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi index 908356c757b6..06b3ef3955c3 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -34,7 +34,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) left_encoder: left_encoder { compatible = "alps,ec11"; label = "L_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 5 GPIO_PULL_UP>; @@ -44,16 +44,17 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) right_encoder: right_encoder { compatible = "alps,ec11"; label = "R_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 18 GPIO_PULL_UP>; b-gpios = <&pro_micro 19 GPIO_PULL_UP>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi index ab568a0986da..c5483af5476c 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -28,34 +28,35 @@ left_encoder1: left_encoder1 { compatible = "alps,ec11"; label = "L_ENCODER1"; - resolution = <4>; + steps = <80>; status = "disabled"; }; left_encoder2: left_encoder2 { compatible = "alps,ec11"; label = "L_ENCODER2"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder1: right_encoder1 { compatible = "alps,ec11"; label = "R_ENCODER1"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder2: right_encoder2 { compatible = "alps,ec11"; label = "R_ENCODER2"; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder1 &right_encoder1>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index fb84c89ed412..c7af200137d3 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -49,7 +49,7 @@ label = "Top Row Encoder"; a-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -58,7 +58,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -67,7 +67,7 @@ label = "Encoder 2"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -76,7 +76,7 @@ label = "Encoder 3"; a-gpios = <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -85,7 +85,7 @@ label = "Encoder 4"; a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 2e415bf8f4d1..a98a2eaa28ea 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -17,6 +17,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1_top_row>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/zodiark/zodiark.dtsi b/app/boards/shields/zodiark/zodiark.dtsi index cda0b1a6daeb..66ebb7b47f9a 100644 --- a/app/boards/shields/zodiark/zodiark.dtsi +++ b/app/boards/shields/zodiark/zodiark.dtsi @@ -50,7 +50,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R label = "LEFT_ENCODER"; a-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; };