diff options
author | Drashna Jaelre <drashna@live.com> | 2021-01-22 08:23:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 08:23:03 -0800 |
commit | 7a08b9d374dfcf9d872738af44b231862064b96f (patch) | |
tree | a83e16b5b6afd67b22fcbdf81ced5896554ca631 /layouts/community/ortho_4x12/drashna | |
parent | c16a3dcb5458bc8d237d26c20a434c333b48d5c8 (diff) |
[Keymap] Cleanup and updating of drashna keymap code (#11516)
* Update other keyboards for rgb matrix changes
* Remove customized bootmagic code
* Fix corne layout compilation error
* Fix compiler errors with all keymaps
* Add Simple Visualizer for ergodox infinity
* Fix compile issue with Corne
* Fix keymap stuff
* Add alias for mouse layer
* Add Halmak Keyboard layout
* Updates for Kyria
* Add support for oled interval
* Change RGB stuff
[CHANGE] Fix coexistence issues
* Fix rgb_stuff
* Add custom ploopyco mouse keymap
* Decrease default dwell time
* Updates based on last breaking changes update
* Disable command on dactyl
* Update ergodox to use proper commands for rgb matrix indicators
* Update all rgb matrix indicator functions
* Update rules for dactyl-manuform
* Reduce wait time for mouse layer off event
* Add more info to logger
* Add wrappers for get_tapping term
* Move version.h include into only file that actually needs it
* Update rgb sleep stuff
* Update key print function
* Change DM keymap settings
* Change pin for DM Manuform
* Add Proton C stuff for Corne keymap
* more arm corne tinkering
* Even more arm stuff for corne
* Cleanup corne stuff
* redirect default keymap to drashna
because I am a very bad man
* change corne rgb priority
* Update tractyl manuform to not conflict
* Add more secret stuff
* more dactyl tweaks
* Add more options to split transport
* Changes of oled support
* Change split settings
* Improve keylogger formatting more
* tweak oled stuff
* Oled and such tweaks
* Reduce brightness due to leds
* Decrease brightness more
* Only run layer code if master
Diffstat (limited to 'layouts/community/ortho_4x12/drashna')
-rw-r--r-- | layouts/community/ortho_4x12/drashna/config.h | 2 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/drashna/keymap.c | 56 |
2 files changed, 28 insertions, 30 deletions
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 6a99fcda01..4a1d1babe2 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -77,6 +77,8 @@ # define PRODUCT Drashna Hacked Planck EZ # endif #endif +#undef NO_USB_STARTUP_CHECK + #define EEPROM_I2C_RM24C512C diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 8070a7d35e..d0df7f5c37 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -16,9 +16,6 @@ #include "drashna.h" -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; -#endif #ifdef BACKLIGHT_ENABLE enum planck_keycodes { @@ -231,7 +228,8 @@ void suspend_wakeup_init_keymap(void) { } // clang-format on -void rgb_matrix_indicators_user(void) { + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); @@ -240,8 +238,6 @@ void rgb_matrix_indicators_user(void) { is_ez = true; # endif - if (g_suspend_state || !rgb_matrix_config.enable) return; - # if defined(RGBLIGHT_ENABLE) if (!userspace_config.rgb_layer_change) # else @@ -250,46 +246,46 @@ void rgb_matrix_indicators_user(void) { { switch (get_highest_layer(layer_state)) { case _GAMEPAD: - rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _DIABLO: - rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER, led_min, led_max); break; case _RAISE: - rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _LOWER: - rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _ADJUST: - rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; default: { bool mods_enabled = IS_LAYER_ON(_MODS); switch (get_highest_layer(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; } break; @@ -299,35 +295,35 @@ void rgb_matrix_indicators_user(void) { switch (get_highest_layer(default_layer_state)) { case _QWERTY: - rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); + RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF); break; case _COLEMAK: - rgb_matrix_set_color(is_ez ? 41 : 42, 0xFF, 0x00, 0xFF); + RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF); break; case _DVORAK: - rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00); break; case _WORKMAN: - rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); + RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21); break; } if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { if (!layer_state_cmp(layer_state, _ADJUST)) { - rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0x00, 0xFF, 0x00); } - rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(36, 0x00, 0xFF, 0x00); } if ((this_mod | this_osm) & MOD_MASK_CTRL) { - rgb_matrix_set_color(25, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(34, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(37, 0xFF, 0x00, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0xFF, 0x00, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(34, 0xFF, 0x00, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(37, 0xFF, 0x00, 0x00); } if ((this_mod | this_osm) & MOD_MASK_GUI) { - rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR(39, 0xFF, 0xD9, 0x00); } if ((this_mod | this_osm) & MOD_MASK_ALT) { - rgb_matrix_set_color(38, 0x00, 0x00, 0xFF); + RGB_MATRIX_INDICATOR_SET_COLOR(38, 0x00, 0x00, 0xFF); } } |