aboutsummaryrefslogtreecommitdiff
path: root/users/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-04-22 11:55:55 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-22 11:55:55 -0700
commita2cec0594b15dc667adf7f1b0e35cb698dc1758d (patch)
treefdfd6646aa6bdd9003125406e2dc5e2069f8ea17 /users/drashna
parent6d73fe12779d6e8527d404572810ea95e714dce7 (diff)
downloadqmk_firmware-a2cec0594b15dc667adf7f1b0e35cb698dc1758d.tar.gz
qmk_firmware-a2cec0594b15dc667adf7f1b0e35cb698dc1758d.zip
[Keymap] Update to Drashna Keymaps (#5594)
* Start to standardize macro timer * Update Fractal layout Specifically, limit the RGB Lighting, since it's too many for the power, and only have the KITT annimation on the front * Update Iris keymap to use I2C for transport * Remove TAP_CODE_DELAY from keyboard in favor of global setting * Remove Woodpad Since it\'s no longer in my possession * Only enable LTO on AVR boards * Run matrix_scans while doing startup light * Run matrix_scan to get split keyboard code synced properly * Fix rgb mode * Remove custom debouncing settings * Make RGB Light Startup Animation optional * Fix opt def * Remove extra tap code delay value * Fix references to keebio boards * Add support for LP Iris keyboard * Add backlight code * Make startup animation optional * Update gitlab ci script * Remove port declaration * Revert avrgcc changes to gitlab ci file * Don't re-set mods * Remove MACRO_TIMER define * Add custom name for crkbd * Add name for Prime M pad * Add names for ortho 4x12 boards * Add some additional handling for rgb init * Change thumb clusters on ergodox * Switch Orthodox to I2C * Fix Space in ergodox keymap * Use OSL for ergodox layout * Ugh, can't find a good layout * Fix typo * Fix up animation startup * Cries in AVR * Fix makefiles for ergodox ez boards * Add support for "secret songs" in my userspace * Reset debounce to 5ms for Ergodox EZ * Fix gitlab CI yaml file * More crying in AVR * Cannot use rgb light and rgb matrix at the same time due to the WS2812 rgb matrix PR until the "Coexistance" PR is merged * Update ODox for split common and i2c * Add split config * Impement Split code * Add support for xscorpion OLED code * Add OLED display config * Fix OLED screen font * Get OLED set up in vertical mode * Remove old OLED code * add per key support for crkbd * Fix split changes * RGB Tweeaks * More OLED tweaks * Fix rotation stuff * Fix more OLED stuff * Remove custom Debounce from Ergodox layout since it's no longer needed
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/.gitignore3
-rw-r--r--users/drashna/.gitlab-ci.yml30
-rw-r--r--users/drashna/config.h2
-rw-r--r--users/drashna/drashna.c18
-rw-r--r--users/drashna/drashna.h6
-rw-r--r--users/drashna/process_records.c20
-rw-r--r--users/drashna/process_records.h2
-rw-r--r--users/drashna/rgb_stuff.c25
-rw-r--r--users/drashna/rules.mk7
9 files changed, 51 insertions, 62 deletions
diff --git a/users/drashna/.gitignore b/users/drashna/.gitignore
new file mode 100644
index 000000000..f84d34d90
--- /dev/null
+++ b/users/drashna/.gitignore
@@ -0,0 +1,3 @@
1secrets.c
2secrets.h
3drashna_song_list.h \ No newline at end of file
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
index 9b18d44fb..92813a27d 100644
--- a/users/drashna/.gitlab-ci.yml
+++ b/users/drashna/.gitlab-ci.yml
@@ -3,7 +3,7 @@ stages:
3 - build 3 - build
4 - deploy 4 - deploy
5 5
6Tests: 6Preliminary Test:
7 stage: test 7 stage: test
8 variables: 8 variables:
9 GIT_SUBMODULE_STRATEGY: recursive 9 GIT_SUBMODULE_STRATEGY: recursive
@@ -12,12 +12,12 @@ Tests:
12 image: ubuntu:18.10 12 image: ubuntu:18.10
13 before_script: 13 before_script:
14 - apt-get update -qy 14 - apt-get update -qy
15 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip 15 - 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
16 - avr-gcc --version 16 - avr-gcc --version
17 - uname -a 17 - uname -a
18 script: 18 script:
19 - make test:all 19 - make test:all
20 - make planck/rev6:default 20 - make planck/rev6:default planck/rev5:default
21 21
22QMK Firmware Defaults: 22QMK Firmware Defaults:
23 stage: deploy 23 stage: deploy
@@ -47,29 +47,7 @@ Drashna Firmware:
47 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip 47 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
48 - avr-gcc --version 48 - avr-gcc --version
49 script: 49 script:
50 - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna 50 - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j16 --output-sync
51 artifacts:
52 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
53 paths:
54 - ./*.hex
55 - ./*.bin
56 expire_in: 1 month
57
58Firmware Deploy:
59 stage: deploy
60 dependencies:
61 - Drashna Firmware
62 variables:
63 GIT_SUBMODULE_STRATEGY: recursive
64 tags:
65 - linux
66 image: ubuntu:18.10
67 before_script:
68 - apt-get update -qy
69 - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
70 - avr-gcc --version
71 script:
72 - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna planck/rev6:drashna fractal:drashna:production
73 artifacts: 51 artifacts:
74 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" 52 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
75 paths: 53 paths:
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 2abd326da..1680eb4cb 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -82,4 +82,4 @@
82#define NO_ACTION_MACRO 82#define NO_ACTION_MACRO
83#define NO_ACTION_FUNCTION 83#define NO_ACTION_FUNCTION
84 84
85#define MACRO_TIMER 5 85#define TAP_CODE_DELAY 5
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 6968a4b92..ec249dd22 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -38,9 +38,9 @@ bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
38 } 38 }
39 clear_keyboard(); 39 clear_keyboard();
40 tap_code(keycode); 40 tap_code(keycode);
41 wait_ms(50); 41 wait_ms(TAP_CODE_DELAY);
42 send_string_with_delay(str, MACRO_TIMER); 42 send_string_with_delay(str, TAP_CODE_DELAY);
43 wait_ms(50); 43 wait_ms(TAP_CODE_DELAY);
44 tap_code(KC_ENTER); 44 tap_code(KC_ENTER);
45 } 45 }
46 if (override) wait_ms(3000); 46 if (override) wait_ms(3000);
@@ -53,12 +53,10 @@ bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) {
53 this_timer= timer_read(); 53 this_timer= timer_read();
54 } else { 54 } else {
55 if (timer_elapsed(this_timer) < TAPPING_TERM){ 55 if (timer_elapsed(this_timer) < TAPPING_TERM){
56 register_code(code); 56 tap_code(code);
57 unregister_code(code);
58 } else { 57 } else {
59 register_code(mod_code); 58 register_code(mod_code);
60 register_code(code); 59 tap_code(code);
61 unregister_code(code);
62 unregister_code(mod_code); 60 unregister_code(mod_code);
63 } 61 }
64 } 62 }
@@ -70,12 +68,10 @@ bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t thi
70 this_timer= timer_read(); 68 this_timer= timer_read();
71 } else { 69 } else {
72 if (timer_elapsed(this_timer) < TAPPING_TERM){ 70 if (timer_elapsed(this_timer) < TAPPING_TERM){
73 register_code(code); 71 tap_code(code);
74 unregister_code(code);
75 } else { 72 } else {
76 register_code(mod_code); 73 register_code(mod_code);
77 register_code(code); 74 tap_code(code);
78 unregister_code(code);
79 unregister_code(mod_code); 75 unregister_code(mod_code);
80 } 76 }
81 } 77 }
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index c19b18943..6645626d9 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -27,7 +27,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 27#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
28 #include "rgb_stuff.h" 28 #include "rgb_stuff.h"
29#endif 29#endif
30 30#if defined(AUDIO_ENABLE) && __GNUC__ > 7
31 #if __has_include("drashna_song_list.h")
32 #include "drashna_song_list.h"
33 #endif
34#endif
31 35
32/* Define layer names */ 36/* Define layer names */
33enum userspace_layers { 37enum userspace_layers {
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 2d9025b37..2b6ccf510 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -18,7 +18,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
18 18
19 // If console is enabled, it will print the matrix position and status of each key pressed 19 // If console is enabled, it will print the matrix position and status of each key pressed
20#ifdef KEYLOGGER_ENABLE 20#ifdef KEYLOGGER_ENABLE
21 #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_iris_rev2) 21 #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2)
22 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); 22 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed);
23 #else 23 #else
24 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); 24 xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
@@ -37,31 +37,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37 uint8_t temp_mod = get_mods(); 37 uint8_t temp_mod = get_mods();
38 uint8_t temp_osm = get_oneshot_mods(); 38 uint8_t temp_osm = get_oneshot_mods();
39 clear_mods(); clear_oneshot_mods(); 39 clear_mods(); clear_oneshot_mods();
40 send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); 40 send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
41#ifndef MAKE_BOOTLOADER 41#ifndef MAKE_BOOTLOADER
42 if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) 42 if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT )
43#endif 43#endif
44 { 44 {
45 #if defined(__arm__) 45 #if defined(__arm__)
46 send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); 46 send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
47 #elif defined(BOOTLOADER_DFU) 47 #elif defined(BOOTLOADER_DFU)
48 send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); 48 send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
49 #elif defined(BOOTLOADER_HALFKAY) 49 #elif defined(BOOTLOADER_HALFKAY)
50 send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); 50 send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
51 #elif defined(BOOTLOADER_CATERINA) 51 #elif defined(BOOTLOADER_CATERINA)
52 send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); 52 send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
53 #endif // bootloader options 53 #endif // bootloader options
54 } 54 }
55 if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } 55 if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); }
56 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); 56 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
57 set_mods(temp_mod);
58 set_oneshot_mods(temp_osm);
59 } 57 }
60 break; 58 break;
61 59
62 case VRSN: // Prints firmware version 60 case VRSN: // Prints firmware version
63 if (record->event.pressed) { 61 if (record->event.pressed) {
64 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); 62 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
65 } 63 }
66 break; 64 break;
67 65
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index f7f2193ec..5e3374d3f 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -56,6 +56,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
56#define ADJUST MO(_ADJUST) 56#define ADJUST MO(_ADJUST)
57#define TG_MODS TG(_MODS) 57#define TG_MODS TG(_MODS)
58#define TG_GAME TG(_GAMEPAD) 58#define TG_GAME TG(_GAMEPAD)
59#define OS_LWR OSL(_LOWER)
60#define OS_RSE OSL(_RAISE)
59 61
60#define KC_SEC1 KC_SECRET_1 62#define KC_SEC1 KC_SECRET_1
61#define KC_SEC2 KC_SECRET_2 63#define KC_SEC2 KC_SECRET_2
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index a98ad590c..b5e145842 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -247,17 +247,20 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
247 247
248 248
249void keyboard_post_init_rgb(void) { 249void keyboard_post_init_rgb(void) {
250#ifdef RGBLIGHT_ENABLE 250#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION)
251 rgblight_enable_noeeprom(); 251 if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }
252 layer_state_set_user(layer_state); 252 if (rgblight_config.enable) {
253 uint16_t old_hue = rgblight_config.hue; 253 layer_state_set_user(layer_state);
254 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); 254 uint16_t old_hue = rgblight_config.hue;
255 for (uint16_t i = 360; i > 0; i--) { 255 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
256 rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255); 256 for (uint16_t i = 360; i > 0; i--) {
257 wait_ms(10); 257 rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255);
258 } 258 matrix_scan();
259 layer_state_set_user(layer_state); 259 wait_ms(10);
260 }
261 }
260#endif 262#endif
263 layer_state_set_user(layer_state);
261} 264}
262 265
263void matrix_scan_rgb(void) { 266void matrix_scan_rgb(void) {
@@ -278,7 +281,7 @@ uint32_t layer_state_set_rgb(uint32_t state) {
278 switch (biton32(state)) { 281 switch (biton32(state)) {
279 case _MACROS: 282 case _MACROS:
280 rgblight_sethsv_noeeprom_orange(); 283 rgblight_sethsv_noeeprom_orange();
281 userspace_config.is_overwatch ? rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 2) : rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 3); 284 userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3);
282 break; 285 break;
283 case _MEDIA: 286 case _MEDIA:
284 rgblight_sethsv_noeeprom_chartreuse(); 287 rgblight_sethsv_noeeprom_chartreuse();
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 5050704a5..bef25e259 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -9,7 +9,9 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
9 SRC += tap_dances.c 9 SRC += tap_dances.c
10endif 10endif
11 11
12EXTRAFLAGS += -flto 12ifeq ($(PLATFORM),AVR)
13 EXTRAFLAGS += -flto
14endif
13 15
14ifeq ($(strip $(NO_SECRETS)), yes) 16ifeq ($(strip $(NO_SECRETS)), yes)
15 OPT_DEFS += -DNO_SECRETS 17 OPT_DEFS += -DNO_SECRETS
@@ -26,6 +28,9 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
26 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) 28 ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
27 OPT_DEFS += -DRGBLIGHT_NOEEPROM 29 OPT_DEFS += -DRGBLIGHT_NOEEPROM
28 endif 30 endif
31 ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
32 OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
33 endif
29endif 34endif
30 35
31ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) 36ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)