mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Use get_u16_str instead of snprintf in autoshift_timer_report (#18606)
This commit is contained in:
parent
7a84a7458c
commit
49030e3e5b
|
@ -17,7 +17,6 @@
|
||||||
#ifdef AUTO_SHIFT_ENABLE
|
#ifdef AUTO_SHIFT_ENABLE
|
||||||
|
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
# include <stdio.h>
|
|
||||||
# include "process_auto_shift.h"
|
# include "process_auto_shift.h"
|
||||||
|
|
||||||
# ifndef AUTO_SHIFT_DISABLED_AT_STARTUP
|
# ifndef AUTO_SHIFT_DISABLED_AT_STARTUP
|
||||||
|
@ -331,11 +330,12 @@ void autoshift_disable(void) {
|
||||||
# ifndef AUTO_SHIFT_NO_SETUP
|
# ifndef AUTO_SHIFT_NO_SETUP
|
||||||
void autoshift_timer_report(void) {
|
void autoshift_timer_report(void) {
|
||||||
# ifdef SEND_STRING_ENABLE
|
# ifdef SEND_STRING_ENABLE
|
||||||
char display[8];
|
const char *autoshift_timeout_str = get_u16_str(autoshift_timeout, ' ');
|
||||||
|
// Skip padding spaces
|
||||||
snprintf(display, 8, "\n%d\n", autoshift_timeout);
|
while (*autoshift_timeout_str == ' ') {
|
||||||
|
autoshift_timeout_str++;
|
||||||
send_string((const char *)display);
|
}
|
||||||
|
send_string(autoshift_timeout_str);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Reference in a new issue