diff options
author | Nick Brassel <[email protected]> | 2024-05-28 14:39:23 +1000 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2024-05-28 14:39:23 +1000 |
commit | f76cc320fd9f3365a80cc0d8af2990bc28d76bde (patch) | |
tree | 3c5330bbc9ab254424ac57335510de341b4ada11 /quantum/send_string/send_string.c | |
parent | 7620c64b99dc5bec480bfaa2708cb3fae709e2b3 (diff) | |
parent | 465ab5a20643722c9b712c6b6924472b7345dd64 (diff) | |
download | qmk_firmware-f76cc320fd9f3365a80cc0d8af2990bc28d76bde.tar.gz qmk_firmware-f76cc320fd9f3365a80cc0d8af2990bc28d76bde.zip |
Merge branch 'develop'0.25.0
Diffstat (limited to 'quantum/send_string/send_string.c')
-rw-r--r-- | quantum/send_string/send_string.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/quantum/send_string/send_string.c b/quantum/send_string/send_string.c index 8b59c19219..44c5ec5ab9 100644 --- a/quantum/send_string/send_string.c +++ b/quantum/send_string/send_string.c @@ -294,7 +294,7 @@ void tap_random_base64(void) { #if defined(__AVR__) void send_string_P(const char *string) { - send_string_with_delay_P(string, 0); + send_string_with_delay_P(string, TAP_CODE_DELAY); } void send_string_with_delay_P(const char *string, uint8_t interval) { @@ -303,6 +303,7 @@ void send_string_with_delay_P(const char *string, uint8_t interval) { if (!ascii_code) break; if (ascii_code == SS_QMK_PREFIX) { ascii_code = pgm_read_byte(++string); + if (ascii_code == SS_TAP_CODE) { // tap uint8_t keycode = pgm_read_byte(++string); @@ -319,24 +320,19 @@ void send_string_with_delay_P(const char *string, uint8_t interval) { // delay int ms = 0; uint8_t keycode = pgm_read_byte(++string); + while (isdigit(keycode)) { ms *= 10; ms += keycode - '0'; keycode = pgm_read_byte(++string); } - while (ms--) - wait_ms(1); + wait_ms(ms); } } else { - send_char(ascii_code); + send_char_with_delay(ascii_code, interval); } + ++string; - // interval - { - uint8_t ms = interval; - while (ms--) - wait_ms(1); - } } } #endif |