Skip to content

Commit

Permalink
Move encoder config to data driven (qmk#19923)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpskenn committed Nov 4, 2023
1 parent d2a20e1 commit 48fad0b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 0 additions & 3 deletions keyboards/nora/v031/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* Rotary Encoder */
#ifdef ENCODER_ENABLE
#define ENCODERS_PAD_A { B1 }
#define ENCODERS_PAD_B { B2 }

// Encoder triggers specific key matrix position,
// when turn knob clockwise or counterclockwise.
// This is handy to assign key codes by VIA.
Expand Down
5 changes: 5 additions & 0 deletions keyboards/nora/v031/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"ws2812": {
"pin": "E6"
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B2"}
]
},
"layouts": {
"LAYOUT": {
"layout": [
Expand Down
3 changes: 0 additions & 3 deletions keyboards/nora/v1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* Rotary Encoder */
#ifdef ENCODER_ENABLE
#define ENCODERS_PAD_A { B1 }
#define ENCODERS_PAD_B { B2 }

// Encoder triggers specific key matrix position,
// when turn knob clockwise or counterclockwise.
// This is handy to assign key codes by VIA.
Expand Down
5 changes: 5 additions & 0 deletions keyboards/nora/v1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"ws2812": {
"pin": "E6"
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B2"}
]
},
"layouts": {
"LAYOUT_all": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2, "w":1.5}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":2.25, "y":4, "w":1.5}, {"x":3.75, "y":4}, {"x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4}, {"x":7.25, "y":4, "w":1.5}, {"x":8.75, "y":4}, {"x":9.75, "y":4, "w":1.5}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.5}]
Expand Down

0 comments on commit 48fad0b

Please sign in to comment.