summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/drashna/.gitlab-ci.yml26
-rw-r--r--users/drashna/config.h4
-rw-r--r--users/drashna/drashna.c40
-rw-r--r--users/drashna/rgb_stuff.c35
4 files changed, 63 insertions, 42 deletions
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
new file mode 100644
index 0000000000..3c95ad8507
--- /dev/null
+++ b/users/drashna/.gitlab-ci.yml
@@ -0,0 +1,26 @@
+stages:
+ - build
+
+qmk_firmware:
+ stage: build
+ variables:
+ GIT_SUBMODULE_STRATEGY: recursive
+ tags:
+ - linux
+ image: ubuntu
+ before_script:
+ - apt-get update -qy
+ - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util diffutils gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
+ - avr-gcc --version
+ script:
+ - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna
+ artifacts:
+ name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
+ paths:
+ - ./*.hex
+ - ./*.bin
+ only:
+ - master
+ - drashna_keymaps
+ - merge-requests
+ - branches
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 9d7d20add0..7e6a7d1c81 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -44,8 +44,8 @@
// and when this option isn't enabled, z rapidly followed by x
// actually sends Ctrl-x. That's bad.)
#define IGNORE_MOD_TAP_INTERRUPT
-#undef PERMISSIVE_HOLD
-// #define TAPPING_FORCE_HOLD
+#define PERMISSIVE_HOLD
+//#define TAPPING_FORCE_HOLD
//#define RETRO_TAPPING
#define FORCE_NKRO
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index b2219e9aa7..4111d29314 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -20,6 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rgb_stuff.h"
userspace_config_t userspace_config;
+#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+ #define DRASHNA_UNICODE_MODE UC_WIN
+#else
+ // set to 2 for UC_WIN, set to 4 for UC_WINC
+ #define DRASHNA_UNICODE_MODE 2
+#endif
uint16_t copy_paste_timer;
// Helper Functions
@@ -154,19 +160,18 @@ void matrix_init_user(void) {
userspace_config.raw = eeconfig_read_user();
-#ifdef BOOTLOADER_CATERINA
- DDRD &= ~(1<<5);
- PORTD &= ~(1<<5);
+ #ifdef BOOTLOADER_CATERINA
+ DDRD &= ~(1<<5);
+ PORTD &= ~(1<<5);
- DDRB &= ~(1<<0);
- PORTB &= ~(1<<0);
-#endif
+ DDRB &= ~(1<<0);
+ PORTB &= ~(1<<0);
+ #endif
-#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- if (eeprom_read_byte(EECONFIG_UNICODEMODE) != UC_WIN) {
- set_unicode_input_mode(UC_WIN);
- }
-#endif //UNICODE_ENABLE
+ #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+ set_unicode_input_mode(DRASHNA_UNICODE_MODE);
+ get_unicode_input_mode();
+ #endif //UNICODE_ENABLE
matrix_init_keymap();
}
@@ -266,9 +271,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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();
- clear_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ clear_mods(); clear_oneshot_mods();
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10);
- if (temp_mod & MODS_SHIFT_MASK) {
+ if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) {
#if defined(__ARM__)
send_string_with_delay_P(PSTR(":dfu-util"), 10);
#elif defined(BOOTLOADER_DFU)
@@ -282,7 +288,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#if defined(KEYBOARD_viterbi)
send_string_with_delay_P(PSTR(":dfu"), 10);
#endif
- if (temp_mod & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); }
+ if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); }
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
set_mods(temp_mod);
}
@@ -422,4 +428,10 @@ void eeconfig_init_user(void) {
userspace_config.raw = 0;
userspace_config.rgb_layer_change = true;
eeconfig_update_user(userspace_config.raw);
+ #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+ set_unicode_input_mode(DRASHNA_UNICODE_MODE);
+ get_unicode_input_mode();
+ #else
+ eeprom_update_byte(EECONFIG_UNICODEMODE, DRASHNA_UNICODE_MODE);
+ #endif
}
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index 9ad94c0c3d..b6de4d39e5 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -12,14 +12,6 @@ void rgblight_sethsv_default_helper(uint8_t index) {
#endif // RGBLIGHT_ENABLE
#ifdef INDICATOR_LIGHTS
-uint8_t last_mod;
-uint8_t last_led;
-uint8_t last_osm;
-uint8_t current_mod;
-uint8_t current_led;
-uint8_t current_osm;
-
-
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) {
if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) {
@@ -86,16 +78,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
}
void matrix_scan_indicator(void) {
- current_mod = get_mods();
- current_led = host_keyboard_leds();
- current_osm = get_oneshot_mods();
-
- set_rgb_indicators(current_mod, current_led, current_osm);
-
- last_mod = current_mod;
- last_led = current_led;
- last_osm = current_osm;
-
+ set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
}
#endif //INDICATOR_LIGHTS
@@ -255,13 +238,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
void matrix_init_rgb(void) {
-#ifdef INDICATOR_LIGHTS
- current_mod = last_mod = get_mods();
- current_led = last_led = host_keyboard_leds();
- current_osm = last_osm = get_oneshot_mods();
-#endif
if (userspace_config.rgb_layer_change) {
+ rgblight_init();
rgblight_enable_noeeprom();
switch (biton32(eeconfig_read_default_layer())) {
case _COLEMAK:
@@ -291,6 +270,7 @@ void matrix_scan_rgb(void) {
uint32_t layer_state_set_rgb(uint32_t state) {
#ifdef RGBLIGHT_ENABLE
+ static bool has_ran;
if (userspace_config.rgb_layer_change) {
switch (biton32(state)) {
case _MACROS:
@@ -332,7 +312,12 @@ uint32_t layer_state_set_rgb(uint32_t state) {
default:
rgblight_sethsv_noeeprom_cyan(); break;
}
- biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
+ if (has_ran) {
+ biton32(state) == _MODS ? rgblight_mode(RGBLIGHT_MODE_BREATHING) : rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
+ } else {
+ biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
+ has_ran = true;
+ }
break;
}
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
@@ -341,5 +326,3 @@ uint32_t layer_state_set_rgb(uint32_t state) {
return state;
}
-
-