summaryrefslogtreecommitdiff
path: root/keyboards/sofle/keyhive/config.h
diff options
context:
space:
mode:
authorWill Winder <wwinder.unh@gmail.com>2022-01-11 15:17:37 -0500
committerGitHub <noreply@github.com>2022-01-11 12:17:37 -0800
commit1f618c8302cc5053c382436a2d1fb11082c99057 (patch)
tree4ea16702e13498c2af2eb403f6e2acefb286cc8b /keyboards/sofle/keyhive/config.h
parent1fdc42155a19a415b2d574ccbf61aac45e6543aa (diff)
keyhive sofle rgb: fix configuration. (#15339)
* keyhive sofle rgb: fix configuration. * Add Colemak-DH and cycle layer keycode. * Fix indentation. * Add PLACEHOLDER for better readability. * Fix breaking changes. * Just one colemak. * PR Cleanup * Use NO_PIN definition instead of C7 * Define animations individually * Remove via json file and update documentation * Reduce LED brightness, one of the animations caused a crash * More PR feedback. * Better credit. * Disable NKRO. * Cleanup RGB configuration. * animations defined in keymap. * Update keyboards/sofle/keyhive/readme.md * PR Feedback. * Update phrasing from template. * Disable RGBLIGHT_ENABLE in keymap for better compatibility with default keymap. * Set a default animation. * Use default in keyboard readme. * Update keyboards/sofle/keyhive/info.json * Move via specific layout into via keymap.
Diffstat (limited to 'keyboards/sofle/keyhive/config.h')
-rwxr-xr-xkeyboards/sofle/keyhive/config.h101
1 files changed, 49 insertions, 52 deletions
diff --git a/keyboards/sofle/keyhive/config.h b/keyboards/sofle/keyhive/config.h
index 14303be411..c934754e65 100755
--- a/keyboards/sofle/keyhive/config.h
+++ b/keyboards/sofle/keyhive/config.h
@@ -20,43 +20,33 @@
#include "config_common.h"
// USB Device descriptor parameter
-
#define VENDOR_ID 0xFC32
#define PRODUCT_ID 0x1287
#define DEVICE_VER 0x0002
#define MANUFACTURER Keyhive
-#define PRODUCT Sofle // VIA version for this PCB is incorrect for the bottom row
+#define PRODUCT Sofle
// Key matrix size
// Rows are doubled-up. Added extra column for rotary encoder VIA mapping.
#define MATRIX_ROWS 10
-#define MATRIX_COLS 6
+#define MATRIX_COLS 7
// wiring of each half
-#define MATRIX_ROW_PINS \
- { C6, D7, E6, B4, B5 }
-#define MATRIX_COL_PINS \
- { B6, B2, B3, B1, F7, F6 }
-#define MATRIX_ROW_PINS_RIGHT \
- { C6, D7, E6, B4, B5 }
-#define MATRIX_COL_PINS_RIGHT \
- { F6, F7, B1, B3, B2, B6 }
+#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
+#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, NO_PIN } // A virtual pin is needed for the encoder key matrix in via.
+#define MATRIX_ROW_PINS_RIGHT { C6, D7, E6, B4, B5 }
+#define MATRIX_COL_PINS_RIGHT { F6, F7, B1, B3, B2, B6, NO_PIN } // A virtual pin is needed for the encoder key matrix in via.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
// Encoder support
-#define ENCODERS_PAD_A \
- { F5 }
-#define ENCODERS_PAD_B \
- { F4 }
-#define ENCODERS_PAD_A_RIGHT \
- { F4 }
-#define ENCODERS_PAD_B_RIGHT \
- { F5 }
-#define ENCODER_RESOLUTIONS \
- { 4, 2 } // Left encoder seems to have double-output issue but right does not.
+#define ENCODERS_PAD_A { F5 }
+#define ENCODERS_PAD_B { F4 }
+#define ENCODERS_PAD_A_RIGHT { F4 }
+#define ENCODERS_PAD_B_RIGHT { F5 }
+#define ENCODER_RESOLUTIONS { 4, 2 } // Left encoder seems to have double-output issue but right does not.
#define TAP_CODE_DELAY 10
@@ -72,34 +62,41 @@
#define SPLIT_TRANSPORT_MIRROR
// Add RGB underglow
-#define RGB_DI_PIN D3
-#define RGBLED_NUM 74
-#define RGBLED_SPLIT \
- { 37, 37 }
-
-#define RGBLIGHT_LIMIT_VAL 160 // Power draw may exceed 0.6A at max brightness with white colour.
-#define RGBLIGHT_LAYERS
-#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
-#define RGBLIGHT_SLEEP
-
-#define DRIVER_LED_TOTAL RGBLED_NUM
-#define RGB_MATRIX_SPLIT RGBLED_SPLIT
-
-#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
-// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
-// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
-
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
-
-#define RGB_MATRIX_HUE_STEP 8
-#define RGB_MATRIX_SAT_STEP 8
-#define RGB_MATRIX_VAL_STEP 8
-#define RGB_MATRIX_SPD_STEP 10
+// by defining in the keyboard, incompatible keymaps will fail to compile.
+#ifdef RGBLIGHT_ENABLE
+# define RGB_DI_PIN D3
+# define RGBLED_NUM 74
+# define RGBLED_SPLIT {37,37}
+# define RGBLIGHT_LIMIT_VAL 100 // LED Brightness, high power draw may exceed the USB limitations of 0.6A and cause a crash.
+# define RGBLIGHT_HUE_STEP 10
+# define RGBLIGHT_SAT_STEP 17
+# define RGBLIGHT_VAL_STEP 17
+//# define RGBLIGHT_LAYERS //Enable layer light indicators. Not required as updates are done in layer_state_set_user and led_update_user (+588).
+# define RGBLIGHT_SLEEP //Turn off LEDs when computer sleeping (+72)
+
+//RGB LED Conversion macro from physical array to electric array (+146). This results in better looking animated effects.
+//First section is the LED matrix, second section is the electrical wiring order, and the third section is the desired mapping
+# define LED_LAYOUT( \
+ L00, L01, L02, L03, L04, L05, L08, L09, L010, L011, L012, L013, \
+ L10, L12, L14, L19, L111, L113, \
+ L20, L21, L22, L23, L24, L25, L28, L29, L210, L211, L212, L213, \
+ L30, L31, L32, L33, L34, L35, L38, L39, L310, L311, L312, L313, \
+ L40, L42, L44, L49, L411, L413, \
+ L50, L51, L52, L53, L54, L55, L58, L59, L510, L511, L512, L513, \
+ L62, L63, L64, L65, L66, L67, L68, L69, L610, L611, \
+ L71, L76, L77, L712 )\
+ { \
+ L14,L12,L10,L40,L42,L44,L71,L76,L66,L65,L55,L35,L25,L05,L04,L24,L34,L54,L64,L63,L53,L33,L23,L03,L02,L22,L32,L52,L62,L51,L31,L21,L01,L00,L20,L30,L50,L19,L111,L113,L413,L411,L49,L712,L77,L67,L68,L58,L38,L28,L08,L09,L29,L39,L59,L69,L610,L510,L310,L210,L010,L011,L211,L311,L511,L611,L512,L312,L212,L012,L013,L213,L313,L513, \
+ }
+//RGB LED logical order map
+# define RGBLIGHT_LED_MAP LED_LAYOUT( \
+ 5, 6, 17, 18, 29, 30, 43, 44, 55, 56, 67, 68, \
+ 4, 16, 28, 45, 57, 69, \
+ 3, 7, 15, 19, 27, 31, 42, 46, 54, 58, 66, 70, \
+ 2, 8, 14, 20, 26, 32, 41, 47, 53, 59, 65, 71, \
+ 1, 13, 25, 48, 60, 72, \
+ 0, 9, 12, 21, 24, 33, 40, 49, 52, 61, 64, 73, \
+ 11, 22, 23, 34, 35, 38, 39, 50, 51, 62, \
+ 10, 36, 37, 63 )
+
+#endif