mirror of https://github.com/arendst/Tasmota.git
parent
1bd3bcc9be
commit
7146b5fd4d
|
@ -107,7 +107,7 @@ void LcdCenter(uint8_t row, char* txt)
|
||||||
line[Settings.display_cols[0]] = 0;
|
line[Settings.display_cols[0]] = 0;
|
||||||
len = strlen(txt);
|
len = strlen(txt);
|
||||||
offset = (len < Settings.display_cols[0]) ? offset = (Settings.display_cols[0] - len) / 2 : 0;
|
offset = (len < Settings.display_cols[0]) ? offset = (Settings.display_cols[0] - len) / 2 : 0;
|
||||||
strlcpy(line +offset, txt, len);
|
strlcpy(line +offset, txt, len +1);
|
||||||
lcd->setCursor(0, row);
|
lcd->setCursor(0, row);
|
||||||
lcd->print(line);
|
lcd->print(line);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue