forked from mirrors/qmk_userspace
fix delay of macro doens't work properly except cable mode
This commit is contained in:
parent
f7a08796ba
commit
0cd4ee07c3
3 changed files with 29 additions and 2 deletions
|
@ -23,6 +23,10 @@
|
|||
#include "keycode.h"
|
||||
#include "action.h"
|
||||
#include "wait.h"
|
||||
#ifdef LK_WIRELESS_ENABLE
|
||||
#include "wireless.h"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL)
|
||||
# include "audio.h"
|
||||
|
@ -177,8 +181,12 @@ void send_string_with_delay(const char *string, uint8_t interval) {
|
|||
ms += keycode - '0';
|
||||
keycode = *(++string);
|
||||
}
|
||||
while (ms--)
|
||||
while (ms--) {
|
||||
#ifdef LK_WIRELESS_ENABLE
|
||||
send_string_task();
|
||||
#endif
|
||||
wait_ms(1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
send_char(ascii_code);
|
||||
|
@ -187,9 +195,16 @@ void send_string_with_delay(const char *string, uint8_t interval) {
|
|||
// interval
|
||||
{
|
||||
uint8_t ms = interval;
|
||||
while (ms--)
|
||||
while (ms--) {
|
||||
#ifdef LK_WIRELESS_ENABLE
|
||||
send_string_task();
|
||||
#endif
|
||||
wait_ms(1);
|
||||
}
|
||||
}
|
||||
#ifdef LK_WIRELESS_ENABLE
|
||||
send_string_task();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue