Follow-up the PR #4335 (Debug char, fix compile errors for lcd pins)
・Solve a flickering when SD card is inserted or removed at using a ASCII LCD + language_kana.h
This commit is contained in:
parent
46117593b9
commit
361307831e
|
@ -2741,7 +2741,11 @@ void lcd_update() {
|
|||
void set_utf_strlen(char* s, uint8_t n) {
|
||||
uint8_t i = 0, j = 0;
|
||||
while (s[i] && (j < n)) {
|
||||
if ((s[i] & 0xC0u) != 0x80u) j++;
|
||||
#if ENABLED(MAPPER_NON)
|
||||
j++;
|
||||
#else
|
||||
if ((s[i] & 0xC0u) != 0x80u) j++;
|
||||
#endif
|
||||
i++;
|
||||
}
|
||||
while (j++ < n) s[i++] = ' ';
|
||||
|
|
Loading…
Reference in a new issue