display: Use '.' and '*' in display_glyph description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d94dd8e9fd
commit
1a7e4e51b3
|
@ -1909,10 +1909,11 @@
|
||||||
# i.e. ~my_display_glyph~
|
# i.e. ~my_display_glyph~
|
||||||
#[display_glyph my_display_glyph]
|
#[display_glyph my_display_glyph]
|
||||||
#data:
|
#data:
|
||||||
# The display data, stored as 16 lines consisting of 16 bits (1 per pixel)
|
# The display data, stored as 16 lines consisting of 16 bits (1 per
|
||||||
# e.g. 1111111111111111 to display a solid horizontal line. Put each display
|
# pixel) where '.' is a blank pixel and '*' is an on pixel (e.g.,
|
||||||
# line into a separate config line. The glyph must consist of exactly 16
|
# "****************" to display a solid horizontal line). Put each
|
||||||
# lines with 16 bits each.
|
# display line into a separate config line. The glyph must consist
|
||||||
|
# of exactly 16 lines with 16 bits each.
|
||||||
|
|
||||||
# If a primary [display] section has been defined in printer.cfg as shown
|
# If a primary [display] section has been defined in printer.cfg as shown
|
||||||
# above it is possible to define multiple auxilary displays. Note that
|
# above it is possible to define multiple auxilary displays. Note that
|
||||||
|
|
|
@ -193,136 +193,136 @@ text: { render("_print_status") }
|
||||||
|
|
||||||
[display_glyph extruder]
|
[display_glyph extruder]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0011111111111100
|
..************..
|
||||||
0000011111100000
|
.....******.....
|
||||||
0011111111111100
|
..************..
|
||||||
0000011111100000
|
.....******.....
|
||||||
0011111111111100
|
..************..
|
||||||
0000000000000000
|
................
|
||||||
0000111111110000
|
....********....
|
||||||
0000111111010000
|
....******.*....
|
||||||
0000111111110000
|
....********....
|
||||||
0000000000000000
|
................
|
||||||
0000001111000000
|
......****......
|
||||||
0000000110000000
|
.......**.......
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph bed]
|
[display_glyph bed]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0001111111110000
|
...*********....
|
||||||
0010000000001000
|
..*.........*...
|
||||||
0111111111111100
|
.*************..
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph bed_heat1]
|
[display_glyph bed_heat1]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0100001000010000
|
.*....*....*....
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0001000010000100
|
...*....*....*..
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0100001000010000
|
.*....*....*....
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0001111111110000
|
...*********....
|
||||||
0010000000001000
|
..*.........*...
|
||||||
0111111111111100
|
.*************..
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph bed_heat2]
|
[display_glyph bed_heat2]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0001000010000100
|
...*....*....*..
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0100001000010000
|
.*....*....*....
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0001000010000100
|
...*....*....*..
|
||||||
0010000100001000
|
..*....*....*...
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0001111111110000
|
...*********....
|
||||||
0010000000001000
|
..*.........*...
|
||||||
0111111111111100
|
.*************..
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph fan1]
|
[display_glyph fan1]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000111000000000
|
....***.........
|
||||||
0001111000011000
|
...****....**...
|
||||||
0001111000111100
|
...****...****..
|
||||||
0000111001111100
|
....***..*****..
|
||||||
0000010000111100
|
.....*....****..
|
||||||
0000000110000000
|
.......**.......
|
||||||
0000000110000000
|
.......**.......
|
||||||
0011110000100000
|
..****....*.....
|
||||||
0011111001110000
|
..*****..***....
|
||||||
0011110001111000
|
..****...****...
|
||||||
0001100001111000
|
...**....****...
|
||||||
0000000001110000
|
.........***....
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph fan2]
|
[display_glyph fan2]
|
||||||
data:
|
data:
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
0000000111100000
|
.......****.....
|
||||||
0000000111100000
|
.......****.....
|
||||||
0000000111000000
|
.......***......
|
||||||
0011000110000000
|
..**...**.......
|
||||||
0011100000000000
|
..***...........
|
||||||
0011110110111100
|
..****.**.****..
|
||||||
0011110110111100
|
..****.**.****..
|
||||||
0000000000011100
|
...........***..
|
||||||
0000000110001100
|
.......**...**..
|
||||||
0000001110000000
|
......***.......
|
||||||
0000011110000000
|
.....****.......
|
||||||
0000011110000000
|
.....****.......
|
||||||
0000000000000000
|
................
|
||||||
0000000000000000
|
................
|
||||||
|
|
||||||
[display_glyph feedrate]
|
[display_glyph feedrate]
|
||||||
data:
|
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
|
# In addition to the above glyphs, 16x4 displays also have the
|
||||||
# following hard-coded single character glyphs: right_arrow, degrees.
|
# following hard-coded single character glyphs: right_arrow, degrees.
|
||||||
|
|
|
@ -147,16 +147,16 @@ class PrinterLCD:
|
||||||
glyph_name = dg.get_name()[len(dg_prefix):]
|
glyph_name = dg.get_name()[len(dg_prefix):]
|
||||||
glyph_data = []
|
glyph_data = []
|
||||||
for line in dg.get('data').split('\n'):
|
for line in dg.get('data').split('\n'):
|
||||||
if line:
|
line = line.strip().replace('.', '0').replace('*', '1')
|
||||||
line_val = int(line, 2)
|
if not line:
|
||||||
if line_val > 65535:
|
continue
|
||||||
raise config.error("Glyph line out of range for " + \
|
if len(line) != 16 or line.replace('0', '').replace('1', ''):
|
||||||
"glyph %s maximum is 65535" % (glyph_name,))
|
raise config.error("Invalid glyph line in %s"
|
||||||
glyph_data.append(line_val)
|
% (glyph_name,))
|
||||||
if len(glyph_data) < 16:
|
glyph_data.append(int(line, 2))
|
||||||
raise config.error("Not enough lines for" + \
|
if len(glyph_data) != 16:
|
||||||
"glyph %s, 16 lines are needed" % (glyph_name,))
|
raise config.error("Glyph %s must be 16 lines" % (glyph_name,))
|
||||||
icons[dg.get_name()[len(dg_prefix):]] = glyph_data
|
icons[glyph_name] = glyph_data
|
||||||
self.lcd_chip.set_glyphs(icons)
|
self.lcd_chip.set_glyphs(icons)
|
||||||
# Initialization
|
# Initialization
|
||||||
def handle_ready(self):
|
def handle_ready(self):
|
||||||
|
|
Loading…
Reference in New Issue