aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-06-08 17:21:42 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-06-08 21:40:42 -0400
commit1a7e4e51b32bb4eead6eab111293ced012871414 (patch)
tree90fa0c7fb432827396666d125ee65cceabea1c93 /klippy/extras/display
parentd94dd8e9fdb1bde245216ada4cfd2e16bf51c4e1 (diff)
downloadkutter-1a7e4e51b32bb4eead6eab111293ced012871414.tar.gz
kutter-1a7e4e51b32bb4eead6eab111293ced012871414.tar.xz
kutter-1a7e4e51b32bb4eead6eab111293ced012871414.zip
display: Use '.' and '*' in display_glyph description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/display')
-rw-r--r--klippy/extras/display/display.cfg224
-rw-r--r--klippy/extras/display/display.py20
2 files changed, 122 insertions, 122 deletions
diff --git a/klippy/extras/display/display.cfg b/klippy/extras/display/display.cfg
index 4939792b..1e9d152e 100644
--- a/klippy/extras/display/display.cfg
+++ b/klippy/extras/display/display.cfg
@@ -193,136 +193,136 @@ text: { render("_print_status") }
[display_glyph extruder]
data:
- 0000000000000000
- 0000000000000000
- 0011111111111100
- 0000011111100000
- 0011111111111100
- 0000011111100000
- 0011111111111100
- 0000000000000000
- 0000111111110000
- 0000111111010000
- 0000111111110000
- 0000000000000000
- 0000001111000000
- 0000000110000000
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ..************..
+ .....******.....
+ ..************..
+ .....******.....
+ ..************..
+ ................
+ ....********....
+ ....******.*....
+ ....********....
+ ................
+ ......****......
+ .......**.......
+ ................
+ ................
[display_glyph bed]
data:
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0000000000000000
- 0001111111110000
- 0010000000001000
- 0111111111111100
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ................
+ ...*********....
+ ..*.........*...
+ .*************..
+ ................
+ ................
[display_glyph bed_heat1]
data:
- 0000000000000000
- 0000000000000000
- 0010000100001000
- 0100001000010000
- 0010000100001000
- 0001000010000100
- 0010000100001000
- 0100001000010000
- 0010000100001000
- 0000000000000000
- 0000000000000000
- 0001111111110000
- 0010000000001000
- 0111111111111100
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ..*....*....*...
+ .*....*....*....
+ ..*....*....*...
+ ...*....*....*..
+ ..*....*....*...
+ .*....*....*....
+ ..*....*....*...
+ ................
+ ................
+ ...*********....
+ ..*.........*...
+ .*************..
+ ................
+ ................
[display_glyph bed_heat2]
data:
- 0000000000000000
- 0000000000000000
- 0010000100001000
- 0001000010000100
- 0010000100001000
- 0100001000010000
- 0010000100001000
- 0001000010000100
- 0010000100001000
- 0000000000000000
- 0000000000000000
- 0001111111110000
- 0010000000001000
- 0111111111111100
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ..*....*....*...
+ ...*....*....*..
+ ..*....*....*...
+ .*....*....*....
+ ..*....*....*...
+ ...*....*....*..
+ ..*....*....*...
+ ................
+ ................
+ ...*********....
+ ..*.........*...
+ .*************..
+ ................
+ ................
[display_glyph fan1]
data:
- 0000000000000000
- 0000000000000000
- 0000111000000000
- 0001111000011000
- 0001111000111100
- 0000111001111100
- 0000010000111100
- 0000000110000000
- 0000000110000000
- 0011110000100000
- 0011111001110000
- 0011110001111000
- 0001100001111000
- 0000000001110000
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ....***.........
+ ...****....**...
+ ...****...****..
+ ....***..*****..
+ .....*....****..
+ .......**.......
+ .......**.......
+ ..****....*.....
+ ..*****..***....
+ ..****...****...
+ ...**....****...
+ .........***....
+ ................
+ ................
[display_glyph fan2]
data:
- 0000000000000000
- 0000000000000000
- 0000000111100000
- 0000000111100000
- 0000000111000000
- 0011000110000000
- 0011100000000000
- 0011110110111100
- 0011110110111100
- 0000000000011100
- 0000000110001100
- 0000001110000000
- 0000011110000000
- 0000011110000000
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ .......****.....
+ .......****.....
+ .......***......
+ ..**...**.......
+ ..***...........
+ ..****.**.****..
+ ..****.**.****..
+ ...........***..
+ .......**...**..
+ ......***.......
+ .....****.......
+ .....****.......
+ ................
+ ................
[display_glyph feedrate]
data:
- 0000000000000000
- 0000000000000000
- 1110111011101100
- 1000100010001010
- 1100110011001010
- 1000100010001010
- 1000111011101100
- 0000000000000000
- 1100010011101110
- 1010101001001000
- 1100111001001100
- 1010101001001000
- 1010101001001110
- 0000000000000000
- 0000000000000000
- 0000000000000000
+ ................
+ ................
+ ***.***.***.**..
+ *...*...*...*.*.
+ **..**..**..*.*.
+ *...*...*...*.*.
+ *...***.***.**..
+ ................
+ **...*..***.***.
+ *.*.*.*..*..*...
+ **..***..*..**..
+ *.*.*.*..*..*...
+ *.*.*.*..*..***.
+ ................
+ ................
+ ................
# In addition to the above glyphs, 16x4 displays also have the
# following hard-coded single character glyphs: right_arrow, degrees.
diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py
index 880e0a32..78d6667c 100644
--- a/klippy/extras/display/display.py
+++ b/klippy/extras/display/display.py
@@ -147,16 +147,16 @@ class PrinterLCD:
glyph_name = dg.get_name()[len(dg_prefix):]
glyph_data = []
for line in dg.get('data').split('\n'):
- if line:
- line_val = int(line, 2)
- if line_val > 65535:
- raise config.error("Glyph line out of range for " + \
- "glyph %s maximum is 65535" % (glyph_name,))
- glyph_data.append(line_val)
- if len(glyph_data) < 16:
- raise config.error("Not enough lines for" + \
- "glyph %s, 16 lines are needed" % (glyph_name,))
- icons[dg.get_name()[len(dg_prefix):]] = glyph_data
+ line = line.strip().replace('.', '0').replace('*', '1')
+ if not line:
+ continue
+ if len(line) != 16 or line.replace('0', '').replace('1', ''):
+ raise config.error("Invalid glyph line in %s"
+ % (glyph_name,))
+ glyph_data.append(int(line, 2))
+ if len(glyph_data) != 16:
+ raise config.error("Glyph %s must be 16 lines" % (glyph_name,))
+ icons[glyph_name] = glyph_data
self.lcd_chip.set_glyphs(icons)
# Initialization
def handle_ready(self):