summaryrefslogtreecommitdiffstats
path: root/users/drashna/process_records.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/process_records.c')
-rw-r--r--users/drashna/process_records.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 5e311e60e8..17d7dc01c5 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -51,27 +51,30 @@ 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();
- 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 || temp_osm & MODS_SHIFT_MASK) {
- #if defined(__ARM__)
- send_string_with_delay_P(PSTR(":dfu-util"), 10);
- #elif defined(BOOTLOADER_DFU)
- send_string_with_delay_P(PSTR(":dfu"), 10);
- #elif defined(BOOTLOADER_HALFKAY)
- send_string_with_delay_P(PSTR(":teensy"), 10);
- #elif defined(BOOTLOADER_CATERINA)
- send_string_with_delay_P(PSTR(":avrdude"), 10);
- #endif // bootloader options
- }
+ #if !defined(KEYBOARD_viterbi)
+ uint8_t temp_mod = get_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ clear_mods(); clear_oneshot_mods();
+ #endif
+ send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER);
#if defined(KEYBOARD_viterbi)
- send_string_with_delay_P(PSTR(":dfu"), 10);
+ send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER);
+ #else
+ if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) {
+ #if defined(__arm__)
+ send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_DFU)
+ send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_HALFKAY)
+ send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_CATERINA)
+ send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER);
+ #endif // bootloader options
+ }
+ if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); }
+ send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER);
+ set_mods(temp_mod);
#endif
- 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);
}
break;