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
				
			
		| 
						 | 
				
			
			@ -526,6 +526,16 @@ void wireless_task(void) {
 | 
			
		|||
    lpm_task();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void send_string_task(void) {
 | 
			
		||||
    if ((get_transport() & TRANSPORT_WIRELESS) && wireless_get_state() == WT_CONNECTED) {
 | 
			
		||||
        wireless_transport.task();
 | 
			
		||||
#ifndef DISABLE_REPORT_BUFFER
 | 
			
		||||
        report_buffer_task();
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
wt_state_t wireless_get_state(void) {
 | 
			
		||||
    return wireless_state;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,6 +92,8 @@ void wireless_enter_sleep_kb(void);
 | 
			
		|||
void              wireless_task(void);
 | 
			
		||||
void              wireless_pre_task(void);
 | 
			
		||||
void              wireless_post_task(void);
 | 
			
		||||
void              send_string_task(void);
 | 
			
		||||
 | 
			
		||||
wt_state_t wireless_get_state(void);
 | 
			
		||||
 | 
			
		||||
void wireless_low_battery_shutdown(void);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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