klipper-dgus/klippy/extras/display/display.cfg

335 lines
8.2 KiB
INI
Raw Normal View History

# This file defines the default layout of the printer's lcd display.
######################################################################
# Helper macros for showing common screen values
######################################################################
[display_template _heater_temperature]
param_heater_name: "extruder"
text:
{% if param_heater_name in printer %}
{% set heater = printer[param_heater_name] %}
# Show glyph
{% if param_heater_name == "heater_bed" %}
{% if heater.target %}
{% set frame = (printer.toolhead.estimated_print_time|int % 2) + 1 %}
~bed_heat{frame}~
{% else %}
~bed~
{% endif %}
{% else %}
~extruder~
{% endif %}
# Show temperature
{ "%3.0f" % (heater.temperature,) }
# Optionally show target
{% if heater.target and (heater.temperature - heater.target)|abs > 2 %}
~right_arrow~
{ "%0.0f" % (heater.target,) }
{% endif %}
~degrees~
{% endif %}
[display_template _fan_speed]
text:
{% if 'fan' in printer %}
{% set speed = printer.fan.speed %}
{% if speed %}
{% set frame = (printer.toolhead.estimated_print_time|int % 2) + 1 %}
~fan{frame}~
{% else %}
~fan1~
{% endif %}
{ "{:>4.0%}".format(speed) }
{% endif %}
[display_template _printing_time]
text:
{% set ptime = printer.idle_timeout.printing_time %}
{ "%02d:%02d" % (ptime // (60 * 60), (ptime // 60) % 60) }
[display_template _print_status]
text:
{% if printer.display_status.message %}
{ printer.display_status.message }
{% elif printer.idle_timeout.printing_time or printer.gcode.busy %}
{% set pos = printer.toolhead.position %}
{ "X%-4.0fY%-4.0fZ%-5.2f" % (pos.x, pos.y, pos.z) }
{% else %}
Ready
{% endif %}
######################################################################
# Default 16x4 display
######################################################################
[display_data _default_16x4 extruder]
position: 0, 0
text:
{% set active_extruder = printer.toolhead.extruder %}
{ render("_heater_temperature", param_heater_name=active_extruder) }
[display_data _default_16x4 fan]
position: 0, 10
text: { render("_fan_speed") }
[display_data _default_16x4 heater_bed]
position: 1, 0
text: { render("_heater_temperature", param_heater_name="heater_bed") }
[display_data _default_16x4 speed_factor]
position: 1, 10
text:
~feedrate~
{ "{:>4.0%}".format(printer.gcode.speed_factor) }
[display_data _default_16x4 print_progress]
position: 2, 0
text: { "{:^10.0%}".format(printer.display_status.progress) }
[display_data _default_16x4 progress_bar]
position: 2, 1 # Draw graphical progress bar after text is written
text: { draw_progress_bar(2, 0, 10, printer.display_status.progress) }
[display_data _default_16x4 printing_time]
position: 2, 10
text: { "%6s" % (render("_printing_time").strip(),) }
[display_data _default_16x4 print_status]
position: 3, 0
text: { render("_print_status") }
######################################################################
# Alternative 16x4 layout for multi-extruders
######################################################################
[display_data _multiextruder_16x4 extruder]
position: 0, 0
text: { render("_heater_temperature", param_heater_name="extruder") }
[display_data _multiextruder_16x4 fan]
position: 0, 10
text: { render("_fan_speed") }
[display_data _multiextruder_16x4 extruder1]
position: 1, 0
text: { render("_heater_temperature", param_heater_name="extruder1") }
[display_data _multiextruder_16x4 print_progress]
position: 1, 10
text: { "{:^6.0%}".format(printer.display_status.progress) }
[display_data _multiextruder_16x4 progress_bar]
position: 1, 11 # Draw graphical progress bar after text is written
text: { draw_progress_bar(1, 10, 6, printer.display_status.progress) }
[display_data _multiextruder_16x4 heater_bed]
position: 2, 0
text: { render("_heater_temperature", param_heater_name="heater_bed") }
[display_data _multiextruder_16x4 printing_time]
position: 2, 10
text: { "%6s" % (render("_printing_time").strip(),) }
[display_data _multiextruder_16x4 print_status]
position: 3, 0
text: { render("_print_status") }
######################################################################
# Default 20x4 display
######################################################################
[display_data _default_20x4 extruder]
position: 0, 0
text: { render("_heater_temperature", param_heater_name="extruder") }
[display_data _default_20x4 heater_bed]
position: 0, 10
text: { render("_heater_temperature", param_heater_name="heater_bed") }
[display_data _default_20x4 extruder1]
position: 1, 0
text: { render("_heater_temperature", param_heater_name="extruder1") }
[display_data _default_20x4 fan]
position: 1, 10
text:
{% if 'fan' in printer %}
{ "Fan {:^4.0%}".format(printer.fan.speed) }
{% endif %}
[display_data _default_20x4 speed_factor]
position: 2, 0
text:
~feedrate~
{ "{:^4.0%}".format(printer.gcode.speed_factor) }
[display_data _default_20x4 print_progress]
position: 2, 8
text:
{% if 'virtual_sdcard' in printer and printer.virtual_sdcard.progress %}
~sd~
{% else %}
~usb~
{% endif %}
{ "{:^4.0%}".format(printer.display_status.progress) }
[display_data _default_20x4 printing_time]
position: 2, 14
text:
~clock~
{ render("_printing_time") }
[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
# In addition to the above glyphs, 16x4 displays also have the
# following hard-coded single character glyphs: right_arrow, degrees.
# The 20x4 displays do not have configurable glyphs. They do have
# hard-coded support for the following single character glyphs:
# right_arrow, degrees, extruder, bed, bed_heat1 (same as bed),
# bed_heat2 (same as bed), feedrate, clock, usb, sd, fan1, fan2 (same
# as fan1).