mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-15 02:37:52 -06:00
display: Replace hard-coded display with new config based display
Introduce a new config based system for specifying the on-screen contents of an lcd screen. The default screen configuration (found in klippy/extras/display/display.cfg) is the same as the previous hard-coded display, so this should not change behavior for existing users. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
5acc181624
commit
2cf03ffa23
5 changed files with 379 additions and 171 deletions
|
@ -1774,6 +1774,12 @@
|
|||
# A reset pin may be specified on ssd1306 displays. If it is not
|
||||
# specified then the hardware must have a pull-up on the
|
||||
# corresponding lcd line.
|
||||
#display_group:
|
||||
# The name of the display_data group to show on the display. This
|
||||
# controls the content of the screen (see the description of
|
||||
# [display_data] below for more information). The default is
|
||||
# _default_20x4 for hd44780 displays and _default_16x4 for other
|
||||
# displays.
|
||||
#menu_root:
|
||||
# Entry point for menu, root menu container name. If this parameter
|
||||
# is not provided then default menu root is used. When provided
|
||||
|
@ -1825,6 +1831,43 @@
|
|||
# The resistance range for a 'kill' button. Range minimum and maximum
|
||||
# comma-separated values must be provided when using analog button.
|
||||
|
||||
# Support for displaying custom data on an lcd screen. One may create
|
||||
# any number of display groups and any number of data items under
|
||||
# those groups. The display will show all the data items for a given
|
||||
# group if the display_group option in the [display] section is set to
|
||||
# the given group name.
|
||||
#[display_data my_group_name my_data_name]
|
||||
#position: 0, 0
|
||||
# Comma separated row and column of the display position that should
|
||||
# be used to display the information. This parameter must be
|
||||
# provided.
|
||||
#text:
|
||||
# The text to show at the given position. This field is evaluated
|
||||
# using command templates (see docs/Command_Templates.md). This
|
||||
# parameter must be provided.
|
||||
|
||||
# Display data text "macros" (one may define any number of sections
|
||||
# with a display_template prefix). This feature allows one to reduce
|
||||
# repetitive definitions in display_data sections. One may use the
|
||||
# builtin render() function in display_data sections to evaluate a
|
||||
# template. For example, if one were to define [display_template
|
||||
# my_template] then one could use "{ render('my_template') }" in a
|
||||
# display_data section.
|
||||
#[display_template my_template_name]
|
||||
#param_<name>:
|
||||
# One may specify any number of options with a "param_" prefix. The
|
||||
# given name will be assigned the given value (parsed as a Python
|
||||
# literal) and will be available during macro expansion. If the
|
||||
# parameter is passed in the call to render() then that value will
|
||||
# be used during macro expansion. For example, a config with
|
||||
# "param_speed = 75" might have a caller with
|
||||
# "render('my_template_name', param_speed=80)". Parameter names may
|
||||
# not use upper case characters.
|
||||
#text:
|
||||
# The text to return when the render() function is called for this
|
||||
# template. This field is evaluated using command templates (see
|
||||
# docs/Command_Templates.md). This parameter must be provided.
|
||||
|
||||
|
||||
######################################################################
|
||||
# Filament sensors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue