diff options
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) { | |||
| 294 | 294 | ||
| 295 | #if defined(__AVR__) | 295 | #if defined(__AVR__) |
| 296 | void send_string_P(const char *string) { | 296 | void send_string_P(const char *string) { |
| 297 | send_string_with_delay_P(string, 0); | 297 | send_string_with_delay_P(string, TAP_CODE_DELAY); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | void send_string_with_delay_P(const char *string, uint8_t interval) { | 300 | 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) { | |||
| 303 | if (!ascii_code) break; | 303 | if (!ascii_code) break; |
| 304 | if (ascii_code == SS_QMK_PREFIX) { | 304 | if (ascii_code == SS_QMK_PREFIX) { |
| 305 | ascii_code = pgm_read_byte(++string); | 305 | ascii_code = pgm_read_byte(++string); |
| 306 | |||
| 306 | if (ascii_code == SS_TAP_CODE) { | 307 | if (ascii_code == SS_TAP_CODE) { |
| 307 | // tap | 308 | // tap |
| 308 | uint8_t keycode = pgm_read_byte(++string); | 309 | uint8_t keycode = pgm_read_byte(++string); |
| @@ -319,24 +320,19 @@ void send_string_with_delay_P(const char *string, uint8_t interval) { | |||
| 319 | // delay | 320 | // delay |
| 320 | int ms = 0; | 321 | int ms = 0; |
| 321 | uint8_t keycode = pgm_read_byte(++string); | 322 | uint8_t keycode = pgm_read_byte(++string); |
| 323 | |||
| 322 | while (isdigit(keycode)) { | 324 | while (isdigit(keycode)) { |
| 323 | ms *= 10; | 325 | ms *= 10; |
| 324 | ms += keycode - '0'; | 326 | ms += keycode - '0'; |
| 325 | keycode = pgm_read_byte(++string); | 327 | keycode = pgm_read_byte(++string); |
| 326 | } | 328 | } |
| 327 | while (ms--) | 329 | wait_ms(ms); |
| 328 | wait_ms(1); | ||
| 329 | } | 330 | } |
| 330 | } else { | 331 | } else { |
| 331 | send_char(ascii_code); | 332 | send_char_with_delay(ascii_code, interval); |
| 332 | } | 333 | } |
| 334 | |||
| 333 | ++string; | 335 | ++string; |
| 334 | // interval | ||
| 335 | { | ||
| 336 | uint8_t ms = interval; | ||
| 337 | while (ms--) | ||
| 338 | wait_ms(1); | ||
| 339 | } | ||
| 340 | } | 336 | } |
| 341 | } | 337 | } |
| 342 | #endif | 338 | #endif |
