mirror of https://github.com/Desuuuu/klipper.git
177 lines
4.9 KiB
INI
177 lines
4.9 KiB
INI
|
# This file defines the default layout of the printer's lcd display.
|
||
|
|
||
|
|
||
|
######################################################################
|
||
|
# Display templates
|
||
|
######################################################################
|
||
|
|
||
|
[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 %}
|
||
|
~animated_bed~
|
||
|
{% 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 _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: { render("_heater_temperature", param_heater_name="extruder") }
|
||
|
|
||
|
[display_data _default_16x4 fan]
|
||
|
position: 0, 10
|
||
|
text:
|
||
|
{% if 'fan' in printer %}
|
||
|
{% set speed = printer.fan.speed %}
|
||
|
{% if speed %}
|
||
|
~animated_fan~
|
||
|
{% else %}
|
||
|
~fan~
|
||
|
{% endif %}
|
||
|
{ "{:>4.0%}".format(speed) }
|
||
|
{% endif %}
|
||
|
|
||
|
[display_data _default_16x4 row1col0]
|
||
|
position: 1, 0
|
||
|
text:
|
||
|
{% if 'extruder1' in printer %}
|
||
|
# A multi-extruder setup uses an alternate screen layout
|
||
|
{ render("_heater_temperature", param_heater_name="extruder1") }
|
||
|
{% else %}
|
||
|
{ render("_heater_temperature", param_heater_name="heater_bed") }
|
||
|
{% endif %}
|
||
|
|
||
|
[display_data _default_16x4 ro1col10]
|
||
|
position: 1, 10
|
||
|
text:
|
||
|
{% if 'extruder1' in printer %}
|
||
|
# A multi-extruder setup uses an alternate screen layout
|
||
|
{% set progress = printer.display_status.progress %}
|
||
|
{ "{:^6}".format(progress) }
|
||
|
{% else %}
|
||
|
~feedrate~
|
||
|
{ "{:>4.0%}".format(printer.gcode.speed_factor) }
|
||
|
{% endif %}
|
||
|
|
||
|
[display_data _default_16x4 row2col0]
|
||
|
position: 2, 0
|
||
|
text:
|
||
|
{% if 'extruder1' in printer %}
|
||
|
# A multi-extruder setup uses an alternate screen layout
|
||
|
{ render("_heater_temperature", param_heater_name="heater_bed") }
|
||
|
{% else %}
|
||
|
{% set progress = printer.display_status.progress %}
|
||
|
{ "{:^10.0%}".format(progress) }
|
||
|
{% endif %}
|
||
|
|
||
|
[display_data _default_16x4 printing_time]
|
||
|
position: 2, 10
|
||
|
text:
|
||
|
{% set ptime = printer.idle_timeout.printing_time %}
|
||
|
{% set progress = printer.display_status.progress %}
|
||
|
{% if progress >= 0.05 and ptime % 12 >= 6 %}
|
||
|
{% set rtime = (ptime / progress) - ptime %}
|
||
|
{ "-%02d:%02d" % (rtime // (60 * 60), (rtime // 60) % 60) }
|
||
|
{% else %}
|
||
|
{% set msg = "%02d:%02d" % (ptime // (60 * 60), (ptime // 60) % 60) %}
|
||
|
{ "%6s" % (msg,) }
|
||
|
{% endif %}
|
||
|
|
||
|
[display_data _default_16x4 print_status]
|
||
|
position: 3, 0
|
||
|
text: { render("_print_status") }
|
||
|
|
||
|
[display_data _default_16x4 progress_bar]
|
||
|
position: 3, 16 # Render graphical progress bar after text is written
|
||
|
text:
|
||
|
{% set progress = printer.display_status.progress %}
|
||
|
{% if 'extruder1' in printer %}
|
||
|
# A multi-extruder setup uses an alternate screen layout
|
||
|
{ draw_progress_bar(1, 10, 6, progress) }
|
||
|
{% else %}
|
||
|
{ draw_progress_bar(2, 0, 10, progress) }
|
||
|
{% endif %}
|
||
|
|
||
|
|
||
|
######################################################################
|
||
|
# 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:
|
||
|
{% set seconds = printer.idle_timeout.printing_time %}
|
||
|
~clock~
|
||
|
{ "%02d:%02d" % (seconds // (60 * 60), (seconds // 60) % 60) }
|
||
|
|
||
|
[display_data _default_20x4 print_status]
|
||
|
position: 3, 0
|
||
|
text: { render("_print_status") }
|