Skip to content

Commit

Permalink
Move RGBLED_NUM to data driven (qmk#21278)
Browse files Browse the repository at this point in the history
on V031 and V1, RGB Lighting is never enabled ->  remove settings
  • Loading branch information
jpskenn committed Nov 5, 2023
1 parent a6a3614 commit abc09f9
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 87 deletions.
1 change: 0 additions & 1 deletion keyboards/nora/v01/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once

/* RGBLIGHT */
#define RGBLED_NUM 16
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
Expand Down
1 change: 1 addition & 0 deletions keyboards/nora/v01/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"pin": "E6"
},
"rgblight": {
"led_count": 16,
"max_brightness": 240
},
"layouts": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/nora/v03/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_MATRIX_KEYPRESSES

#else
#define RGBLED_NUM 71
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
Expand Down
1 change: 1 addition & 0 deletions keyboards/nora/v03/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"max_brightness": 150
},
"rgblight": {
"led_count": 71,
"max_brightness": 150
},
"layouts": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/nora/v03/keymaps/jpskenn/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@

#pragma once

// Change LED count to actually installed.
#undef RGBLED_NUM
#define RGBLED_NUM 2

#define RGBLIGHT_LAYER_BLINK
#define RGBLIGHT_MAX_LAYERS 10 // Blinkで2レイヤー追加すると、デフォルトの8レイヤーを超えてしまうため、ここで定義
4 changes: 0 additions & 4 deletions keyboards/nora/v03/keymaps/jpskenn_full/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#pragma once

// Change LED count to actually installed.
#undef RGBLED_NUM
#define RGBLED_NUM 2

#define RGBLIGHT_LAYER_BLINK
#define RGBLIGHT_MAX_LAYERS 10 // Blinkで2レイヤー追加すると、デフォルトの8レイヤーを超えてしまうため、ここで定義

Expand Down
4 changes: 0 additions & 4 deletions keyboards/nora/v03/keymaps/jpskenn_full_midi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#pragma once

// Change LED count to actually installed.
#undef RGBLED_NUM
#define RGBLED_NUM 2

#define RGBLIGHT_LAYER_BLINK
#define RGBLIGHT_MAX_LAYERS 10 // Blinkで2レイヤー追加すると、デフォルトの8レイヤーを超えてしまうため、ここで定義

Expand Down
19 changes: 0 additions & 19 deletions keyboards/nora/v031/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

#ifdef RGBLIGHT_ENABLE
/* RGB Lighting */
#define RGBLED_NUM 64

#define RGBLIGHT_DEFAULT_VAL 40
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
/* Lighting Layers */
#define RGBLIGHT_LAYERS
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF // Overriding RGB Lighting on/off status
#define RGBLIGHT_LAYERS_RETAIN_VAL // Keeps RGB values between lighting layer changes
#define RGBLIGHT_MAX_LAYERS 10 // default: 8
#define RGBLIGHT_LAYER_BLINK
/* Animations & Effects */
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_TWINKLE
#endif

/* External EEPROM */
// Use 24LC64 EEPROM
#define EEPROM_I2C_24LC64
Expand Down
3 changes: 0 additions & 3 deletions keyboards/nora/v031/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
"driver": "ws2812",
"max_brightness": 128
},
"rgblight": {
"max_brightness": 128
},
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B2"}
Expand Down
16 changes: 6 additions & 10 deletions keyboards/nora/v031/keymaps/jpskenn_re/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
#pragma once

// Change number of LEDs for "RE layout".
#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 65
#else
#undef RGBLED_NUM
#define RGBLED_NUM 65
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 65

#ifdef RGB_MATRIX_ENABLE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#endif
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#undef ENABLE_RGB_MATRIX_MULTISPLASH
9 changes: 2 additions & 7 deletions keyboards/nora/v031/keymaps/via_re/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,5 @@
#pragma once

// Change number of LEDs for "RE layout".
#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 65
#else
#undef RGBLED_NUM
#define RGBLED_NUM 65
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 65
13 changes: 3 additions & 10 deletions keyboards/nora/v1/keymaps/jpskenn_fw/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@

#pragma once

#ifdef RGB_MATRIX_ENABLE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 64

#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 64
#else
#undef RGBLED_NUM
#define RGBLED_NUM 64
#endif
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE

// LED index for DM_RECx indicator
// NOTE: LED on R4 is connected from right to left. So, the index is inverted.
Expand Down
18 changes: 8 additions & 10 deletions keyboards/nora/v1/keymaps/jpskenn_re/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
#pragma once

// Change number of LEDs for "RE layout".
#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 62
#else
#undef RGBLED_NUM
#define RGBLED_NUM 62
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 62

#ifdef RGB_MATRIX_ENABLE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#endif
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE

// LED index for DM_RECx indicator
// NOTE: LED on R4 is connected from right to left. So, the index is inverted.
#define LED_INDEX_R4_LEFT_INSIDE 49
#define LED_INDEX_R4_RIGHT_INSIDE 48
9 changes: 2 additions & 7 deletions keyboards/nora/v1/keymaps/via_fw/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#pragma once

#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 64
#else
#undef RGBLED_NUM
#define RGBLED_NUM 64
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 64
9 changes: 2 additions & 7 deletions keyboards/nora/v1/keymaps/via_re/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once

// Change number of LEDs for "RE layout".
#ifdef RGB_MATRIX_ENABLE
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 62
#else
#undef RGBLED_NUM
#define RGBLED_NUM 62
#endif
#undef RGB_MATRIX_LED_COUNT
#define RGB_MATRIX_LED_COUNT 62

0 comments on commit abc09f9

Please sign in to comment.