Concatenate LCD static strings
This commit is contained in:
parent
13dc619f43
commit
3a67fb77b0
@ -494,13 +494,13 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
|
|||||||
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
||||||
while (--pad >= 0) { lcd_print(' '); n--; }
|
while (--pad >= 0) { lcd_print(' '); n--; }
|
||||||
}
|
}
|
||||||
while (c = pgm_read_byte(pstr)) {
|
while (n > 0 && (c = pgm_read_byte(pstr))) {
|
||||||
n -= lcd_print(c);
|
n -= lcd_print(c);
|
||||||
pstr++;
|
pstr++;
|
||||||
}
|
}
|
||||||
if (valstr) {
|
if (valstr) while (n > 0 && (c = *valstr)) {
|
||||||
lcd_print(valstr);
|
n -= lcd_print(c);
|
||||||
n -= lcd_strlen(valstr);
|
valstr++;
|
||||||
}
|
}
|
||||||
while (n-- > 0) lcd_print(' ');
|
while (n-- > 0) lcd_print(' ');
|
||||||
}
|
}
|
||||||
|
@ -838,13 +838,13 @@ static void lcd_implementation_status_screen() {
|
|||||||
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
||||||
while (--pad >= 0) { lcd.print(' '); n--; }
|
while (--pad >= 0) { lcd.print(' '); n--; }
|
||||||
}
|
}
|
||||||
while ((c = pgm_read_byte(pstr)) && n > 0) {
|
while (n > 0 && (c = pgm_read_byte(pstr))) {
|
||||||
n -= lcd_print(c);
|
n -= lcd_print(c);
|
||||||
pstr++;
|
pstr++;
|
||||||
}
|
}
|
||||||
if (valstr) {
|
if (valstr) while (n > 0 && (c = *valstr)) {
|
||||||
lcd_print(valstr);
|
n -= lcd_print(c);
|
||||||
n -= lcd_strlen(valstr);
|
valstr++;
|
||||||
}
|
}
|
||||||
while (n-- > 0) lcd.print(' ');
|
while (n-- > 0) lcd.print(' ');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user