From e88f80a891138d40acddcdd2b3dface8b2a57404 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 7 Sep 2019 08:57:30 -0700 Subject: [Keymap] Big Drashna code update (#6639) * Add a quefrency keymap * New Alt-ernate layouts * Enable Per Key Tapping Term to preserve sanity * Use underglow and mod lights for status on Corne * Update the drashna_ms keymap for quefrency * Disable Audio since there isn't enough space * Update KC_MAKE to ues :flash target * Cleanup ergodox layout * Enable i2c support for Iris * Add keymap support for CG_SWAP * Enable RGB Matrix Shutdown mode * enable heatmap * Update gitlab CI to install python3 * Remove game macros These are no longer needed, and haven't been used in ages * Cleanup planck layout * Add RGB Matrix fun and RGB cleanup * Add keycode and config for RGB Matrix idle animations * Clean up rgb idle animation code * Add rgb idle keycode to keymaps * Fix issues with rgb matrix idle animation * Fix some handling for idle animation * Reduce idle animation timeout to 15s to be more reasonable * fix up rgb stuff * Fix isses with rgb functions not being called for matrix * Use custom EEPROM Magic Number so testing is easier * Extend Default Layer macro to support a lot more layers * Fix bjohnson macropad * Adjust KC_MAKE to process mods for more consistent behavior * Fix up rgb stuff on corne * Corne OLED Overhaul * Fixes a number of issues with weirdness. * Fixes issues with keylogger (should be more reliable now) * Modulaize the OLED render sections * Rewrite layer display code * Update URL for Font Editor Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows. * Update polling rate on all keebs * Fix planck ez layout config * Remove macros from Viterbi --- users/drashna/.gitlab-ci.yml | 2 +- users/drashna/config.h | 6 +++ users/drashna/drashna.c | 37 +++++----------- users/drashna/drashna.h | 16 +++---- users/drashna/process_records.c | 63 +++++--------------------- users/drashna/process_records.h | 17 +------- users/drashna/rgb_stuff.c | 97 +++++++++++++++++++++++++++++++++-------- users/drashna/rgb_stuff.h | 13 +++++- users/drashna/rules.mk | 4 -- users/drashna/wrappers.h | 4 +- 10 files changed, 128 insertions(+), 131 deletions(-) (limited to 'users/drashna') diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index 679bdf4351..7218a21bec 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml @@ -10,7 +10,7 @@ QMK Firmware: image: ubuntu:18.10 before_script: - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr unzip wget zip + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip - avr-gcc --version - uname -a script: diff --git a/users/drashna/config.h b/users/drashna/config.h index 8f6e700d2b..a0f92d8f38 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -1,5 +1,11 @@ #pragma once +// Use custom magic number so that when switching branches, EEPROM always gets reset +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1337 + +/* Set Polling rate to 1000Hz */ +#define USB_POLLING_INTERVAL_MS 1 + #ifdef AUDIO_ENABLE # if __GNUC__ > 7 # if __has_include("drashna_song_list.h") diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index c1809dad0a..6a436e0af0 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -25,26 +25,7 @@ userspace_config_t userspace_config; # define DRASHNA_UNICODE_MODE 2 #endif -// This block is for all of the gaming macros, as they were all doing -// the same thing, but with differring text sent. -bool send_game_macro(const char *str, keyrecord_t *record, bool override) { - if (!record->event.pressed || override) { - uint16_t keycode; - if (userspace_config.is_overwatch) { - keycode = KC_BSPC; - } else { - keycode = KC_ENTER; - } - clear_keyboard(); - tap_code(keycode); - wait_ms(TAP_CODE_DELAY); - send_string_with_delay(str, TAP_CODE_DELAY); - wait_ms(TAP_CODE_DELAY); - tap_code(KC_ENTER); - } - if (override) wait_ms(3000); - return false; -} + bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { static uint16_t this_timer; @@ -123,7 +104,7 @@ __attribute__((weak)) void keyboard_post_init_keymap(void) {} void keyboard_post_init_user(void) { -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) keyboard_post_init_rgb(); #endif keyboard_post_init_keymap(); @@ -132,6 +113,8 @@ void keyboard_post_init_user(void) { __attribute__((weak)) void shutdown_keymap(void) {} + void rgb_matrix_update_pwm_buffers(void); + void shutdown_user(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable_noeeprom(); @@ -139,9 +122,9 @@ void shutdown_user(void) { rgblight_setrgb_red(); #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE - // uint16_t timer_start = timer_read(); - // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); - // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } + rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); + rgb_matrix_update_pwm_buffers(); + #endif // RGB_MATRIX_ENABLE shutdown_keymap(); } @@ -176,7 +159,7 @@ void matrix_scan_user(void) { run_diablo_macro_check(); #endif // TAP_DANCE_ENABLE -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) matrix_scan_rgb(); #endif // RGBLIGHT_ENABLE @@ -190,7 +173,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } // Then runs keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = layer_state_set_rgb(state); #endif // RGBLIGHT_ENABLE return layer_state_set_keymap(state); @@ -203,7 +186,7 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state layer_state_t default_layer_state_set_user(layer_state_t state) { state = default_layer_state_set_keymap(state); #if 0 -# ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = default_layer_state_set_rgb(state); # endif // RGBLIGHT_ENABLE #endif diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0d6dac380b..e3edf81124 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -49,13 +49,8 @@ enum userspace_layers { _ADJUST, }; -/* -define modifiers here, since MOD_* doesn't seem to work for these - */ - bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); -bool send_game_macro(const char *str, keyrecord_t *record, bool override); void matrix_init_keymap(void); void shutdown_keymap(void); void suspend_power_down_keymap(void); @@ -69,11 +64,12 @@ void eeconfig_init_keymap(void); typedef union { uint32_t raw; struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - uint8_t unicode_mod :4; - bool swapped_numbers :1; + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + uint8_t unicode_mod :4; + bool swapped_numbers :1; + bool rgb_matrix_idle_anim :1; }; } userspace_config_t; diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 5666d052dc..6eb21d2f27 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -21,16 +21,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // KEYLOGGER_ENABLE switch (keycode) { - case KC_QWERTY ... KC_CARPLAX: + case KC_QWERTY ... KC_WORKMAN: if (record->event.pressed) { - set_single_persistent_default_layer(keycode - KC_QWERTY); + uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); + if (!mods) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } else if (mods & MOD_MASK_SHIFT) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 4); + } else if (mods & MOD_MASK_CTRL) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 8); + } } break; case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); + uint8_t temp_mod = mod_config(get_mods()); + uint8_t temp_osm = mod_config(get_oneshot_mods()); clear_mods(); clear_oneshot_mods(); send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); @@ -38,15 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) #endif { -#if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); -#elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); -#elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); -#elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); -#endif // bootloader options + send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); } if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); @@ -68,44 +67,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - // These are a serious of gaming macros. - // Only enables for the viterbi, basically, - // to save on firmware space, since it's limited. -#ifdef MACROS_ENABLED - case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros - if (record->event.pressed) { - userspace_config.is_overwatch ^= 1; - eeconfig_update_user(userspace_config.raw); - } -# ifdef RGBLIGHT_ENABLE - userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); -# endif // RGBLIGHT_ENABLE - break; - case KC_SALT: - return send_game_macro("Salt, salt, salt...", record, false); - case KC_MORESALT: - return send_game_macro("Please sir, can I have some more salt?!", record, false); - case KC_SALTHARD: - return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); - case KC_GOODGAME: - return send_game_macro("Good game, everyone!", record, false); - case KC_GLHF: - return send_game_macro("Good luck, have fun!!!", record, false); - case KC_SYMM: - return send_game_macro("Left click to win!", record, false); - case KC_JUSTGAME: - return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); - case KC_TORB: - return send_game_macro("That was positively riveting!", record, false); - case KC_AIM: - send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); - return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); - case KC_C9: - return send_game_macro("OMG!!! C9!!!", record, false); - case KC_GGEZ: - return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); -#endif // MACROS_ENABLED - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them #ifdef TAP_DANCE_ENABLE if (record->event.pressed) { diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index 8901a6f91c..0ae468a04e 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -13,25 +13,10 @@ enum userspace_custom_keycodes { KC_COLEMAK, // Sets default layer to COLEMAK KC_DVORAK, // Sets default layer to DVORAK KC_WORKMAN, // Sets default layer to WORKMAN - KC_NORMAN, // Sets default layer to NORMAN - KC_MALTRON, // Sets default layer to MALTRON - KC_EUCALYN, // Sets default layer to EUCALYN - KC_CARPLAX, // Sets default layer to CARPLAX KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) - KC_SALT, // See drashna.c for details - KC_MORESALT, - KC_SALTHARD, - KC_GOODGAME, - KC_SYMM, - KC_JUSTGAME, - KC_GLHF, - KC_TORB, - KC_AIM, - KC_C9, - KC_GGEZ, KC_MAKE, // Run keyboard's customized make command KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations KC_SECRET_1, // test1 KC_SECRET_2, // test2 KC_SECRET_3, // test3 diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 12851e2616..a9af0566e3 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -5,12 +5,24 @@ #if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; bool has_initialized; -#endif -#ifdef RGBLIGHT_ENABLE void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } #endif // RGBLIGHT_ENABLE +#if defined(RGB_MATRIX_ENABLE) +static uint32_t hypno_timer; +# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL +# else +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN +# endif +#endif + +/* Custom indicators for modifiers. + * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. + * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. + */ +#ifdef RGBLIGHT_ENABLE #ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { @@ -77,6 +89,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { } } +/* Function for the indicators */ void matrix_scan_indicator(void) { if (has_initialized) { set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); @@ -89,6 +102,7 @@ static rgblight_fadeout lights[RGBLED_NUM]; __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } +/* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ bool rgblight_twinkle_is_led_used(uint8_t index) { switch (index) { # ifdef INDICATOR_LIGHTS @@ -130,6 +144,7 @@ bool rgblight_twinkle_is_led_used(uint8_t index) { } } +/* Handler for fading/twinkling effect */ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive bool litup = false; for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { @@ -156,6 +171,9 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg } } +/* Triggers a LED to fade/twinkle. + * This function handles the selection of the LED and prepres for it to be used. + */ void start_rgb_light(void) { uint8_t indices[RGBLED_NUM]; uint8_t indices_count = 0; @@ -194,12 +212,23 @@ void start_rgb_light(void) { rgblight_sethsv_at(light->hue, 255, light->life, light_index); } #endif +#endif // RGBLIGHT_ENABLE bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { + uint16_t temp_keycode = keycode; + // Filter out the actual keycode from MT and LT keys. if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { - keycode = keycode & 0xFF; + temp_keycode &= 0xFF; } - switch (keycode) { + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + hypno_timer = timer_read32(); + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } +#endif + + switch (temp_keycode) { #ifdef RGBLIGHT_TWINKLE case KC_A ... KC_SLASH: case KC_F1 ... KC_F12: @@ -210,40 +239,58 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { start_rgb_light(); } - return true; break; #endif // RGBLIGHT_TWINKLE case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) if (record->event.pressed) { userspace_config.rgb_layer_change ^= 1; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); eeconfig_update_user(userspace_config.raw); if (userspace_config.rgb_layer_change) { layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) } } #endif // RGBLIGHT_ENABLE - return false; break; -#ifdef RGBLIGHT_ENABLE + case RGB_IDL: // This allows me to use underglow as layer indication, or as normal +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (record->event.pressed) { + userspace_config.rgb_matrix_idle_anim ^= 1; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } + } +#endif + break; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (record->event.pressed) { + bool is_eeprom_updated = false; +#ifdef RGBLIGHT_ENABLE + // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled if (userspace_config.rgb_layer_change) { userspace_config.rgb_layer_change = false; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + is_eeprom_updated = true; } +#endif +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + userspace_config.rgb_matrix_idle_anim = false; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + is_eeprom_updated = true; + } +#endif + if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } } - return true; break; -#endif // RGBLIGHT_ENABLE } return true; } void keyboard_post_init_rgb(void) { -#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) +#if defined(RGBLIGHT_ENABLE) +# if defined(RGBLIGHT_STARTUP_ANIMATION) bool is_enabled = rgblight_config.enable; if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); @@ -262,17 +309,31 @@ void keyboard_post_init_rgb(void) { rgblight_disable_noeeprom(); } -#endif +# endif layer_state_set_user(layer_state); +#endif +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } +#endif } void matrix_scan_rgb(void) { -#ifdef RGBLIGHT_TWINKLE +#ifdef RGBLIGHT_ENABLE +# ifdef RGBLIGHT_TWINKLE scan_rgblight_fadeout(); -#endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE -#ifdef INDICATOR_LIGHTS +# ifdef INDICATOR_LIGHTS matrix_scan_indicator(); +# endif +#endif + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } #endif } diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index ce45d6a00b..7e34c93c11 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -4,20 +4,29 @@ # include "rgb_matrix.h" #endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) typedef struct { bool enabled; uint8_t hue; uint16_t timer; uint8_t life; } rgblight_fadeout; +#endif bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); -void scan_rgblight_fadeout(void); void keyboard_post_init_rgb(void); void matrix_scan_rgb(void); layer_state_t layer_state_set_rgb(layer_state_t state); layer_state_t default_layer_state_set_rgb(layer_state_t state); + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) +void scan_rgblight_fadeout(void); +#endif +#if defined(RGBLIGHT_ENABLE) void rgblight_sethsv_default_helper(uint8_t index); -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +#endif +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); +#endif diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index b414036a47..7b77a51d96 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -40,10 +40,6 @@ ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) endif -ifeq ($(strip $(MACROS_ENABLED)), yes) - OPT_DEFS += -DMACROS_ENABLED -endif - ifdef CONSOLE_ENABLE ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) OPT_DEFS += -DKEYLOGGER_ENABLE diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index a87247071f..d22e2959cf 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -174,11 +174,11 @@ NOTE: These are all the same length. If you do a search/replace #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM +#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN +#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT // clang-format on -- cgit v1.2.3