display: Move glyph definition to printer config

This commit allows to modify the icons (or glyphs) in the displays that
support it. Existing icons can be modified and new icons can be added via
a [display_glyph] section in the config.

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
Florian Heilmann
2020-06-07 16:25:19 +00:00
committed by KevinOConnor
parent 722770f62f
commit 3dcac1308e
7 changed files with 196 additions and 173 deletions

View File

@@ -13,7 +13,8 @@ text:
# Show glyph
{% if param_heater_name == "heater_bed" %}
{% if heater.target %}
~animated_bed~
{% set frame = (printer.toolhead.estimated_print_time|int % 2) + 1 %}
~bed_heat{frame}~
{% else %}
~bed~
{% endif %}
@@ -35,9 +36,10 @@ text:
{% if 'fan' in printer %}
{% set speed = printer.fan.speed %}
{% if speed %}
~animated_fan~
{% set frame = (printer.toolhead.estimated_print_time|int % 2) + 1 %}
~fan{frame}~
{% else %}
~fan~
~fan1~
{% endif %}
{ "{:>4.0%}".format(speed) }
{% endif %}
@@ -183,3 +185,140 @@ text:
[display_data _default_20x4 print_status]
position: 3, 0
text: { render("_print_status") }
######################################################################
# Default display glyphs
######################################################################
[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