From 7f6ef1220159bda81df9ecfff14ce8a062f81f13 Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 2 Jul 2026 15:30:59 +0200 Subject: [PATCH] be more clever about custom chars --- src/lcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lcd.c b/src/lcd.c index e79422f..ee18824 100644 --- a/src/lcd.c +++ b/src/lcd.c @@ -68,9 +68,7 @@ void lcd_set_cursor(struct lcd_t *lcd, const uint8_t row, const uint8_t col) { } void lcd_set_custom_char(struct lcd_t *lcd, const uint8_t index, const lcd_glyph_t *glyph) { - uint8_t cmdbuf[] = {254, 78, index, 0, 0, 0, 0, 0, 0, 0, 0}; - memcpy(&cmdbuf[3], glyph, sizeof(lcd_glyph_t)); - memcpy(lcd->writebuf.cchar[index], cmdbuf, sizeof(cmdbuf)); + memcpy(lcd->writebuf.cchar[index] + 3, glyph, sizeof(lcd_glyph_t)); // we prepare the command in init, so we can just copy the glyph after the command } /* writes string to write buffer at calculated pos, we trust it to be null terminated */