diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 987c9b0d19..66c9b9e8bd 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . /* Select rows configuration */ // Rows are 4 or 5 -#define HELIX_ROWS 5 +// #define HELIX_ROWS 5 see ./rules.mk /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 1705579ad8..070785255b 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -26,8 +26,9 @@ define HELIX_CUSTOMISE_MSG endef # Helix keyboard customize -# you can edit follows 4 Variables -# jp: 以下の4つの変数を必要に応じて編集します。 +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = no # OLED_ENABLE LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) @@ -41,6 +42,13 @@ LED_ANIMATIONS = yes # LED animations # $(eval $(call HELIX_CUSTOMISE_MSG)) # $(info ) +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes OPT_DEFS += -DRGBLED_BACK