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 /users/drashna | |
| parent | c16a3dcb5458bc8d237d26c20a434c333b48d5c8 (diff) | |
| download | qmk_firmware-7a08b9d374dfcf9d872738af44b231862064b96f.tar.gz qmk_firmware-7a08b9d374dfcf9d872738af44b231862064b96f.zip | |
[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 'users/drashna')
| -rw-r--r-- | users/drashna/config.h | 16 | ||||
| -rw-r--r-- | users/drashna/drashna.c | 28 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 5 | ||||
| -rw-r--r-- | users/drashna/oled_stuff.c | 31 | ||||
| -rw-r--r-- | users/drashna/process_records.c | 7 | ||||
| -rw-r--r-- | users/drashna/process_records.h | 2 | ||||
| -rw-r--r-- | users/drashna/rgb_matrix_stuff.c | 6 | ||||
| -rw-r--r-- | users/drashna/rgb_matrix_stuff.h | 2 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 6 | ||||
| -rw-r--r-- | users/drashna/wrappers.h | 9 |
10 files changed, 64 insertions, 48 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h index 9fc65e5c9..8837ca0a5 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -22,6 +22,10 @@ | |||
| 22 | /* Set Polling rate to 1000Hz */ | 22 | /* Set Polling rate to 1000Hz */ |
| 23 | #define USB_POLLING_INTERVAL_MS 1 | 23 | #define USB_POLLING_INTERVAL_MS 1 |
| 24 | 24 | ||
| 25 | #if defined(SPLIT_KEYBOAD) | ||
| 26 | # define SPLIT_MODS_ENABLE | ||
| 27 | #endif | ||
| 28 | |||
| 25 | #ifdef AUDIO_ENABLE | 29 | #ifdef AUDIO_ENABLE |
| 26 | 30 | ||
| 27 | # define AUDIO_CLICKY | 31 | # define AUDIO_CLICKY |
| @@ -40,9 +44,9 @@ | |||
| 40 | #endif // !AUDIO_ENABLE | 44 | #endif // !AUDIO_ENABLE |
| 41 | 45 | ||
| 42 | #ifdef RGBLIGHT_ENABLE | 46 | #ifdef RGBLIGHT_ENABLE |
| 43 | # undef RGBLIGHT_ANIMATIONS | 47 | # define RGBLIGHT_SLEEP |
| 44 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) | 48 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) |
| 45 | # define RGBLIGHT_SLEEP | 49 | # undef RGBLIGHT_ANIMATIONS |
| 46 | # define RGBLIGHT_EFFECT_BREATHING | 50 | # define RGBLIGHT_EFFECT_BREATHING |
| 47 | # define RGBLIGHT_EFFECT_SNAKE | 51 | # define RGBLIGHT_EFFECT_SNAKE |
| 48 | # define RGBLIGHT_EFFECT_KNIGHT | 52 | # define RGBLIGHT_EFFECT_KNIGHT |
| @@ -101,6 +105,14 @@ | |||
| 101 | # endif // AVR | 105 | # endif // AVR |
| 102 | #endif // RGB_MATRIX_ENABLE | 106 | #endif // RGB_MATRIX_ENABLE |
| 103 | 107 | ||
| 108 | #ifdef OLED_DRIVER_ENABLE | ||
| 109 | # ifdef SPLIT_KEYBOARD | ||
| 110 | # define OLED_UPDATE_INTERVAL 60 | ||
| 111 | # else | ||
| 112 | # define OLED_UPDATE_INTERVAL 15 | ||
| 113 | # endif | ||
| 114 | #endif | ||
| 115 | |||
| 104 | #ifndef ONESHOT_TAP_TOGGLE | 116 | #ifndef ONESHOT_TAP_TOGGLE |
| 105 | # define ONESHOT_TAP_TOGGLE 2 | 117 | # define ONESHOT_TAP_TOGGLE 2 |
| 106 | #endif // !ONESHOT_TAP_TOGGLE | 118 | #endif // !ONESHOT_TAP_TOGGLE |
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index ec6484621..95c9d2f62 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -49,21 +49,6 @@ bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this | |||
| 49 | return false; | 49 | return false; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | void bootmagic_lite(void) { | ||
| 53 | matrix_scan(); | ||
| 54 | #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 | ||
| 55 | wait_ms(DEBOUNCING_DELAY * 2); | ||
| 56 | #elif defined(DEBOUNCE) && DEBOUNCE > 0 | ||
| 57 | wait_ms(DEBOUNCE * 2); | ||
| 58 | #else | ||
| 59 | wait_ms(30); | ||
| 60 | #endif | ||
| 61 | matrix_scan(); | ||
| 62 | if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { | ||
| 63 | bootloader_jump(); | ||
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} | 52 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} |
| 68 | 53 | ||
| 69 | void keyboard_pre_init_user(void) { | 54 | void keyboard_pre_init_user(void) { |
| @@ -75,6 +60,7 @@ void keyboard_pre_init_user(void) { | |||
| 75 | // customization of the keymap. Use _keymap instead of _user | 60 | // customization of the keymap. Use _keymap instead of _user |
| 76 | // functions in the keymaps | 61 | // functions in the keymaps |
| 77 | __attribute__((weak)) void matrix_init_keymap(void) {} | 62 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 63 | __attribute__((weak)) void matrix_init_secret(void) {} | ||
| 78 | 64 | ||
| 79 | // Call user matrix init, set default RGB colors and then | 65 | // Call user matrix init, set default RGB colors and then |
| 80 | // call the keymap's init function | 66 | // call the keymap's init function |
| @@ -86,6 +72,8 @@ void matrix_init_user(void) { | |||
| 86 | DDRB &= ~(1 << 0); | 72 | DDRB &= ~(1 << 0); |
| 87 | PORTB &= ~(1 << 0); | 73 | PORTB &= ~(1 << 0); |
| 88 | #endif | 74 | #endif |
| 75 | |||
| 76 | matrix_init_secret(); | ||
| 89 | matrix_init_keymap(); | 77 | matrix_init_keymap(); |
| 90 | } | 78 | } |
| 91 | 79 | ||
| @@ -103,7 +91,9 @@ void keyboard_post_init_user(void) { | |||
| 103 | 91 | ||
| 104 | __attribute__((weak)) void shutdown_keymap(void) {} | 92 | __attribute__((weak)) void shutdown_keymap(void) {} |
| 105 | 93 | ||
| 94 | #ifdef RGB_MATRIX_ENABLE | ||
| 106 | void rgb_matrix_update_pwm_buffers(void); | 95 | void rgb_matrix_update_pwm_buffers(void); |
| 96 | #endif | ||
| 107 | 97 | ||
| 108 | void shutdown_user(void) { | 98 | void shutdown_user(void) { |
| 109 | #ifdef RGBLIGHT_ENABLE | 99 | #ifdef RGBLIGHT_ENABLE |
| @@ -129,6 +119,8 @@ void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } | |||
| 129 | 119 | ||
| 130 | __attribute__((weak)) void matrix_scan_keymap(void) {} | 120 | __attribute__((weak)) void matrix_scan_keymap(void) {} |
| 131 | 121 | ||
| 122 | __attribute__((weak)) void matrix_scan_secret(void) {} | ||
| 123 | |||
| 132 | // No global matrix scan code, so just run keymap's matrix | 124 | // No global matrix scan code, so just run keymap's matrix |
| 133 | // scan function | 125 | // scan function |
| 134 | void matrix_scan_user(void) { | 126 | void matrix_scan_user(void) { |
| @@ -149,6 +141,8 @@ void matrix_scan_user(void) { | |||
| 149 | matrix_scan_rgb_matrix(); | 141 | matrix_scan_rgb_matrix(); |
| 150 | #endif | 142 | #endif |
| 151 | 143 | ||
| 144 | matrix_scan_secret(); | ||
| 145 | |||
| 152 | matrix_scan_keymap(); | 146 | matrix_scan_keymap(); |
| 153 | } | 147 | } |
| 154 | 148 | ||
| @@ -157,6 +151,8 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) | |||
| 157 | // on layer change, no matter where the change was initiated | 151 | // on layer change, no matter where the change was initiated |
| 158 | // Then runs keymap's layer change check | 152 | // Then runs keymap's layer change check |
| 159 | layer_state_t layer_state_set_user(layer_state_t state) { | 153 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 154 | if (!is_keyboard_master()) { return state; } | ||
| 155 | |||
| 160 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 156 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 161 | #if defined(RGBLIGHT_ENABLE) | 157 | #if defined(RGBLIGHT_ENABLE) |
| 162 | state = layer_state_set_rgb_light(state); | 158 | state = layer_state_set_rgb_light(state); |
| @@ -168,6 +164,8 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t | |||
| 168 | 164 | ||
| 169 | // Runs state check and changes underglow color and animation | 165 | // Runs state check and changes underglow color and animation |
| 170 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 166 | layer_state_t default_layer_state_set_user(layer_state_t state) { |
| 167 | if (!is_keyboard_master()) { return state; } | ||
| 168 | |||
| 171 | state = default_layer_state_set_keymap(state); | 169 | state = default_layer_state_set_keymap(state); |
| 172 | #if 0 | 170 | #if 0 |
| 173 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 171 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 772005a03..35d11101d 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | #include QMK_KEYBOARD_H | 18 | #include QMK_KEYBOARD_H |
| 19 | 19 | ||
| 20 | #include "version.h" | ||
| 21 | #include "eeprom.h" | 20 | #include "eeprom.h" |
| 22 | #include "wrappers.h" | 21 | #include "wrappers.h" |
| 23 | #include "process_records.h" | 22 | #include "process_records.h" |
| @@ -58,13 +57,17 @@ enum userspace_layers { | |||
| 58 | _ADJUST, | 57 | _ADJUST, |
| 59 | }; | 58 | }; |
| 60 | 59 | ||
| 60 | #define _MOUSE _MACROS | ||
| 61 | |||
| 61 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); | 62 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); |
| 62 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | 63 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); |
| 63 | void matrix_init_keymap(void); | 64 | void matrix_init_keymap(void); |
| 65 | void matrix_init_secret(void); | ||
| 64 | void shutdown_keymap(void); | 66 | void shutdown_keymap(void); |
| 65 | void suspend_power_down_keymap(void); | 67 | void suspend_power_down_keymap(void); |
| 66 | void suspend_wakeup_init_keymap(void); | 68 | void suspend_wakeup_init_keymap(void); |
| 67 | void matrix_scan_keymap(void); | 69 | void matrix_scan_keymap(void); |
| 70 | void matrix_scan_secret(void); | ||
| 68 | layer_state_t layer_state_set_keymap(layer_state_t state); | 71 | layer_state_t layer_state_set_keymap(layer_state_t state); |
| 69 | layer_state_t default_layer_state_set_keymap(layer_state_t state); | 72 | layer_state_t default_layer_state_set_keymap(layer_state_t state); |
| 70 | void led_set_keymap(uint8_t usb_led); | 73 | void led_set_keymap(uint8_t usb_led); |
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 46288aad2..30eb068f7 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c | |||
| @@ -16,8 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "drashna.h" | 17 | #include "drashna.h" |
| 18 | 18 | ||
| 19 | extern uint8_t is_master; | ||
| 20 | |||
| 21 | #ifndef KEYLOGGER_LENGTH | 19 | #ifndef KEYLOGGER_LENGTH |
| 22 | // # ifdef OLED_DISPLAY_128X64 | 20 | // # ifdef OLED_DISPLAY_128X64 |
| 23 | # define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) | 21 | # define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) |
| @@ -187,11 +185,11 @@ void render_bootmagic_status(void) { | |||
| 187 | }; | 185 | }; |
| 188 | 186 | ||
| 189 | bool is_bootmagic_on; | 187 | bool is_bootmagic_on; |
| 190 | #ifdef OLED_DISPLAY_128X64 | 188 | #ifdef OLED_DISPLAY_128X64 |
| 191 | is_bootmagic_on = !keymap_config.swap_lctl_lgui; | 189 | is_bootmagic_on = !keymap_config.swap_lctl_lgui; |
| 192 | #else | 190 | #else |
| 193 | is_bootmagic_on = keymap_config.swap_lctl_lgui; | 191 | is_bootmagic_on = keymap_config.swap_lctl_lgui; |
| 194 | #endif | 192 | #endif |
| 195 | 193 | ||
| 196 | oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false); | 194 | oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false); |
| 197 | #ifdef OLED_DISPLAY_128X64 | 195 | #ifdef OLED_DISPLAY_128X64 |
| @@ -259,21 +257,20 @@ void render_status_secondary(void) { | |||
| 259 | #if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64) | 257 | #if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64) |
| 260 | oled_driver_render_logo(); | 258 | oled_driver_render_logo(); |
| 261 | #endif | 259 | #endif |
| 262 | #ifdef SPLIT_TRANSPORT_MIRROR | ||
| 263 | /* Show Keyboard Layout */ | 260 | /* Show Keyboard Layout */ |
| 264 | render_default_layer_state(); | 261 | render_default_layer_state(); |
| 265 | render_layer_state(); | 262 | render_layer_state(); |
| 266 | render_mod_status(get_mods() | get_oneshot_mods()); | 263 | render_mod_status(get_mods() | get_oneshot_mods()); |
| 267 | render_keylogger_status(); | 264 | render_keylogger_status(); |
| 268 | 265 | ||
| 269 | #endif | ||
| 270 | } | 266 | } |
| 271 | // clang-format on | 267 | // clang-format on |
| 272 | 268 | ||
| 273 | void render_status_main(void) { | 269 | void render_status_main(void) { |
| 270 | oled_driver_render_logo(); | ||
| 274 | /* Show Keyboard Layout */ | 271 | /* Show Keyboard Layout */ |
| 275 | render_default_layer_state(); | 272 | render_default_layer_state(); |
| 276 | render_keylock_status(host_keyboard_leds()); | 273 | // render_keylock_status(host_keyboard_leds()); |
| 277 | render_bootmagic_status(); | 274 | render_bootmagic_status(); |
| 278 | render_user_status(); | 275 | render_user_status(); |
| 279 | 276 | ||
| @@ -281,19 +278,15 @@ void render_status_main(void) { | |||
| 281 | } | 278 | } |
| 282 | 279 | ||
| 283 | void oled_task_user(void) { | 280 | void oled_task_user(void) { |
| 284 | if (timer_elapsed32(oled_timer) > 30000) { | ||
| 285 | oled_off(); | ||
| 286 | return; | ||
| 287 | } | ||
| 288 | #ifndef SPLIT_KEYBOARD | ||
| 289 | else { | ||
| 290 | oled_on(); | ||
| 291 | } | ||
| 292 | #endif | ||
| 293 | |||
| 294 | update_log(); | 281 | update_log(); |
| 295 | 282 | ||
| 296 | if (is_master) { | 283 | if (is_keyboard_master()) { |
| 284 | if (timer_elapsed32(oled_timer) > 30000) { | ||
| 285 | oled_off(); | ||
| 286 | return; | ||
| 287 | } else { | ||
| 288 | oled_on(); | ||
| 289 | } | ||
| 297 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 290 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
| 298 | } else { | 291 | } else { |
| 299 | render_status_secondary(); | 292 | render_status_secondary(); |
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 19bdef73f..14fda92de 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "drashna.h" | 17 | #include "drashna.h" |
| 18 | #include "version.h" | ||
| 18 | 19 | ||
| 19 | uint16_t copy_paste_timer; | 20 | uint16_t copy_paste_timer; |
| 20 | 21 | ||
| @@ -27,11 +28,7 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t | |||
| 27 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 28 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 28 | // If console is enabled, it will print the matrix position and status of each key pressed | 29 | // If console is enabled, it will print the matrix position and status of each key pressed |
| 29 | #ifdef KEYLOGGER_ENABLE | 30 | #ifdef KEYLOGGER_ENABLE |
| 30 | # if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) | 31 | uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); |
| 31 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); | ||
| 32 | # else | ||
| 33 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); | ||
| 34 | # endif | ||
| 35 | #endif // KEYLOGGER_ENABLE | 32 | #endif // KEYLOGGER_ENABLE |
| 36 | #ifdef OLED_DRIVER_ENABLE | 33 | #ifdef OLED_DRIVER_ENABLE |
| 37 | process_record_user_oled(keycode, record); | 34 | process_record_user_oled(keycode, record); |
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index d41be962d..e59e2242e 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | #include "drashna.h" | 18 | #include "drashna.h" |
| 19 | 19 | ||
| 20 | #if defined(KEYMAP_SAFE_RANGE) | 20 | #if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball) |
| 21 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE | 21 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE |
| 22 | #else | 22 | #else |
| 23 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE | 23 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE |
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 52e261234..573cc7bc9 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c | |||
| @@ -26,7 +26,7 @@ static uint32_t hypno_timer; | |||
| 26 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | 26 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { | 29 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) { |
| 30 | HSV hsv = {hue, sat, val}; | 30 | HSV hsv = {hue, sat, val}; |
| 31 | if (hsv.v > rgb_matrix_get_val()) { | 31 | if (hsv.v > rgb_matrix_get_val()) { |
| 32 | hsv.v = rgb_matrix_get_val(); | 32 | hsv.v = rgb_matrix_get_val(); |
| @@ -40,7 +40,7 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode | |||
| 40 | RGB rgb = hsv_to_rgb(hsv); | 40 | RGB rgb = hsv_to_rgb(hsv); |
| 41 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | 41 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 42 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | 42 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { |
| 43 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 43 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); |
| 44 | } | 44 | } |
| 45 | } | 45 | } |
| 46 | break; | 46 | break; |
| @@ -50,7 +50,7 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode | |||
| 50 | RGB rgb = hsv_to_rgb(hsv); | 50 | RGB rgb = hsv_to_rgb(hsv); |
| 51 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | 51 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 52 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | 52 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { |
| 53 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 53 | RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); |
| 54 | } | 54 | } |
| 55 | } | 55 | } |
| 56 | break; | 56 | break; |
diff --git a/users/drashna/rgb_matrix_stuff.h b/users/drashna/rgb_matrix_stuff.h index 592f9c9e6..b86f2f651 100644 --- a/users/drashna/rgb_matrix_stuff.h +++ b/users/drashna/rgb_matrix_stuff.h | |||
| @@ -22,4 +22,4 @@ void keyboard_post_init_rgb_matrix(void); | |||
| 22 | void matrix_scan_rgb_matrix(void); | 22 | void matrix_scan_rgb_matrix(void); |
| 23 | 23 | ||
| 24 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | 24 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); |
| 25 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | 25 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max); |
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index d98f7cc2f..b67f707b6 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -178,7 +178,11 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) { | |||
| 178 | uint8_t mode = layer_state_cmp(state,_MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; | 178 | uint8_t mode = layer_state_cmp(state,_MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; |
| 179 | switch (get_highest_layer(state|default_layer_state)) { | 179 | switch (get_highest_layer(state|default_layer_state)) { |
| 180 | case _MACROS: | 180 | case _MACROS: |
| 181 | rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); | 181 | # ifdef RGBLIGHT_EFFECT_TWINKLE |
| 182 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5); | ||
| 183 | # else | ||
| 184 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); | ||
| 185 | # endif | ||
| 182 | break; | 186 | break; |
| 183 | case _MEDIA: | 187 | case _MEDIA: |
| 184 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); | 188 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); |
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index ed4022aaa..d135f44af 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h | |||
| @@ -162,6 +162,15 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 162 | #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z | 162 | #define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z |
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | #define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z | ||
| 166 | #define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM | ||
| 167 | #define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH | ||
| 168 | |||
| 169 | #define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J | ||
| 170 | #define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I | ||
| 171 | #define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y | ||
| 172 | |||
| 173 | |||
| 165 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 | 174 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 |
| 166 | #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 | 175 | #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 |
| 167 | #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 | 176 | #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 |
