From 00d3061e02fa5fedaa6e6cebd310d4e716ffffee Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 6 Jan 2020 01:49:49 -0800 Subject: [Keymap] Cleanup of Drashna code (#7800) * ifdef rgb stuff like a madman for RGB Coexistance * Re-enable RGB Light on Planck * fix RGB Coexistance issue * Tweak feature settings for Ergodox EZ Glow * Their powers combine, and I am Captain RGB This one is for noroadsleft and yan. * Limit brightness when both RGB features are enabled * Change shutdown method * Add RGB Coexistience stuff to keymap * disable RGBLIGHT_SLEEP until a solution can be found * Disable Unicode on the kyria * Fix up Iris rev defines * Fix up community layouts to compile properly * Cleanup rgb stuff * Merge ergodox keymaps * Update CCCV macro to use tap_code16 * Enable Solenoid on C39 Because josh couldn't * Enable RGB Light, not Matrix on rev6 keymap * Only enable LTO on non-ARM boards * Clean up Bootmagic OLED display * Enable RGBLIGHT_SPLIT on kyria Not that it does anything * Add hotkey for discord --- keyboards/c39/keymaps/drashna/config.h | 2 + keyboards/c39/keymaps/drashna/rules.mk | 2 + keyboards/keebio/iris/keymaps/drashna/config.h | 14 ++++--- keyboards/kyria/keymaps/drashna/config.h | 1 + keyboards/kyria/keymaps/drashna/keymap.c | 52 +++++++++++--------------- keyboards/kyria/keymaps/drashna/rules.mk | 2 +- 6 files changed, 36 insertions(+), 37 deletions(-) (limited to 'keyboards') diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h index 5d53fe54bb..789b7cc140 100644 --- a/keyboards/c39/keymaps/drashna/config.h +++ b/keyboards/c39/keymaps/drashna/config.h @@ -10,3 +10,5 @@ #define RGB_DI_PIN B10 #define RGBLED_NUM 15 + +#define SOLENOID_PIN B11 diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index d216f6abe6..6ebd15a180 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -18,3 +18,5 @@ AUDIO_ENABLE = yes # Audio output on port C6 RGBLIGHT_ENABLE = yes # RGB Enable / Disable RGBLIGHT_STARTUP_ANIMATION = yes + +HAPTIC_ENABLE = SOLENOID diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index 25678bd67d..49381b60a5 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -46,11 +46,13 @@ along with this program. If not, see . #ifdef AUDIO_ENABLE # define C6_AUDIO # ifdef RGBLIGHT_ENABLE -# define NO_MUSIC_MODE +# ifndef __arm__ +# define NO_MUSIC_MODE +# endif # endif // RGBLIGHT_ENABLE #endif // AUDIO_ENABLE -#ifndef KEYBOARD_keebio_iris_rev3 +#if defined(KEYBOARD_keebio_iris_rev1) || defined(KEYBOARD_keebio_iris_rev2) # define QMK_ESC_OUTPUT F6 // usually COL # define QMK_ESC_INPUT D7 // usually ROW # define QMK_LED B0 @@ -58,10 +60,12 @@ along with this program. If not, see . #endif #undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris Rev .2 +#if defined(KEYBOARD_keebio_iris_rev2) +# define PRODUCT Drashna Hacked Iris Rev 2 #elif defined(KEYBOARD_keebio_iris_rev3) -# define PRODUCT Drashna Hacked Iris Rev .3 +# define PRODUCT Drashna Hacked Iris Rev 3 +#elif defined(KEYBOARD_keebio_iris_rev4) +# define PRODUCT Drashna Hacked Iris Rev 4 #endif #define SHFT_LED1 6 diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h index 83d6283f56..e566b16d5c 100644 --- a/keyboards/kyria/keymaps/drashna/config.h +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -31,6 +31,7 @@ # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SPLIT #endif // If you are using an Elite C rev3 on the slave side, uncomment the lines below: diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c index bdb00e5967..5604f1a692 100644 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -52,7 +52,7 @@ void add_keylog(uint16_t keycode); LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, MEH(KC_MINS), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ ) /* Re-pass though to allow templates to be used */ @@ -191,30 +191,14 @@ void render_keylogger_status(void) { void render_default_layer_state(void) { oled_write_P(PSTR("Layout: "), false); switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - oled_write_ln_P(PSTR("Qwerty "), false); - break; - case _COLEMAK: - oled_write_ln_P(PSTR("Colemak"), false); - break; - case _DVORAK: - oled_write_ln_P(PSTR("Dvorak"), false); - break; - case _WORKMAN: - oled_write_ln_P(PSTR("Workman"), false); - break; - case _NORMAN: - oled_write_ln_P(PSTR("Norman"), false); - break; - case _MALTRON: - oled_write_ln_P(PSTR("Maltron"), false); - break; - case _EUCALYN: - oled_write_ln_P(PSTR("Eucalyn"), false); - break; - case _CARPLAX: - oled_write_ln_P(PSTR("Carplax"), false); - break; + case _QWERTY: oled_write_ln_P(PSTR("Qwerty"), false); break; + case _COLEMAK: oled_write_ln_P(PSTR("Colemak"), false); break; + case _DVORAK: oled_write_ln_P(PSTR("Dvorak"), false); break; + case _WORKMAN: oled_write_ln_P(PSTR("Workman"), false); break; + case _NORMAN: oled_write_ln_P(PSTR("Norman"), false); break; + case _MALTRON: oled_write_ln_P(PSTR("Maltron"), false); break; + case _EUCALYN: oled_write_ln_P(PSTR("Eucalyn"), false); break; + case _CARPLAX: oled_write_ln_P(PSTR("Carplax"), false); break; } } @@ -230,11 +214,11 @@ void render_layer_state(void) { void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR("Lock: "), false); - oled_write_P(PSTR("NUM"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR("NUML"), led_usb_state & (1 << USB_LED_NUM_LOCK)); oled_write_P(PSTR(" "), false); oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); oled_write_P(PSTR(" "), false); - oled_write_ln_P(PSTR("SCL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); + oled_write_ln_P(PSTR("SCLK"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); } void render_mod_status(uint8_t modifiers) { @@ -255,15 +239,21 @@ void render_bootmagic_status(void) { {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, }; oled_write_P(PSTR("Boot "), false); - oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + if (keymap_config.swap_lctl_lgui) { + oled_write_P(logo[1][0], false); + } else { + oled_write_P(logo[0][0], false); + } oled_write_P(PSTR(" "), false); oled_write_P(PSTR("NKRO"), keymap_config.nkro); oled_write_P(PSTR(" "), false); oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); oled_write_P(PSTR("Magic "), false); - oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + if (keymap_config.swap_lctl_lgui) { + oled_write_P(logo[1][1], false); + } else { + oled_write_P(logo[0][1], false); + } oled_write_P(PSTR(" "), false); oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); oled_write_P(PSTR(" "), false); diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk index c1a37f5c59..e835340bbf 100644 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -1,7 +1,7 @@ OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_STARTUP_ANIMATION = yes +RGBLIGHT_STARTUP_ANIMATION = no BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -- cgit v1.2.1