display: Make hd44780 glyphs configurable

Allow the 20x4 hd44780 screen glyphs to be customizable from the
config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-06-08 22:04:24 -04:00
parent 1a7e4e51b3
commit 7713986ae1
6 changed files with 179 additions and 115 deletions

View File

@@ -137,7 +137,9 @@ class ST7920:
self.graphics_framebuffers[gfx_fb][x:x+len(data)] = data
def set_glyphs(self, glyphs):
for glyph_name, glyph_data in glyphs.items():
self.icons[glyph_name] = glyph_data
data = glyph_data.get('icon16x16')
if data is not None:
self.icons[glyph_name] = data
# Setup animated glyphs
self.cache_glyph('fan2', 'fan1', 0)
self.cache_glyph('bed_heat2', 'bed_heat1', 1)