aboutsummaryrefslogtreecommitdiffstats
path: root/config/example-menu.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'config/example-menu.cfg')
-rw-r--r--config/example-menu.cfg181
1 files changed, 181 insertions, 0 deletions
diff --git a/config/example-menu.cfg b/config/example-menu.cfg
new file mode 100644
index 00000000..0e26a986
--- /dev/null
+++ b/config/example-menu.cfg
@@ -0,0 +1,181 @@
+# This file serves as documentation for config parameters. One may
+# copy and edit this file to configure a new menu layout.
+# The snippets in this file may be copied into the main printer.cfg file.
+# See the "example.cfg" file for description of common config parameters.
+
+# Available menu elements:
+# item - purely visual element
+# command - same like 'item' but with gcode trigger
+# input - same like 'command' but has value changing capabilities
+# list - menu element container, with entry and exit gcode triggers
+# vsdcard - same as 'list' but will append files from virtual sdcard
+# deck - special container for custom screens (cards) has entry and exit gcode triggers.
+# card - special content card for custom screens. Can only be used in 'deck'!
+
+#[menu item1]
+#type: item
+# Type will determine menu item properties and behaviours:
+#name:
+# This is mandatory attribute for every menu element.
+# You can use Python output formatting for parameter and transform values.
+# Quotes can be used in the beginning and end of name.
+#cursor:
+# It allows to change cursor character for selected menu element.
+# The default is >
+# This parameter is optional.
+#width:
+# This attribute accepts integer value. Element name is cut to this width.
+# This parameter is optional.
+#scroll:
+# This attribute accepts static boolean value. You can use it together with 'width'.
+# When this is enabled then names longer than width are scrolled back and forth.
+# The default is disabled. This parameter is optional.
+#enable:
+# This attribute accepts static boolean values and parameters (converted to boolean).
+# It accepts multiple logical expressions. Values separated by comma will return True if all elements are true.
+# Values on different lines will return True if any element is true.
+# You can use logical negation by using character ! as parameter prefix.
+#parameter:
+# This attribute accepts float values or special variables. Multiple values are delimited by comma.
+# All available parameter variables can be listed by 'MENU DO=dump' gcode, menu itself must be running.
+# This value is available for output formatting as {0}..{n} Where n is count of parameters.
+#transform:
+# This attribute allows to transform parameters value to something else.
+# More than one transformation can be added. Each transformation must be on separate line.
+# These transformed values are available for output formatting as {n+1}..{x}
+# Where n is count of parameters and x is count of transformations.
+# In order to transform the value of a particular parameter, you must add
+# an parameter index as prefix. Like this "transform: 1.choose('OFF','ON')"
+# If the index is not set then the default index 0 is used.
+#
+# map(fromLow,fromHigh,toLow,toHigh) - interpolate re-maps a parameter value from one range to another.
+# Output value type is taken from toHigh. It can be int or float.
+#
+# choose(e1,e2) - boolean chooser, converts the value of the parameter to the boolean type (0 and 1),
+# and selects the corresponding value by the index from the list.
+#
+# choose(e1,e2,...) - int chooser, converts the value of the parameter to the int type
+# and selects the corresponding value by the index from the list.
+#
+# choose({key:value,..}) - special dictionary chooser, parameter value cast type by first key type.
+# Selects the corresponding value by the key from the dictionary.
+#
+# int(), float(), bool(), str(), abs(), bin(), hex(), oct(), days(), hours(), minutes(), seconds()
+# These will convert parameter value to the special form.
+# int,float,bool,str,abs,bin,hex and oct are python functions.
+# days,hours,minutes,seconds will convert parameter value (it's taken as seconds) to time specific value
+#
+# scale(xx) - Multiplies parameter value by this xx. Pure interger or float value is excpected.
+
+
+#[menu command1]
+#type:command
+#name:
+#cursor:
+#width:
+#scroll:
+#enable:
+#parameter:
+#transform:
+#gcode:
+# When menu element is clicked then gcodes on this attribute will be executed.
+# Can have multiline gcode script and supports output formatting for parameter and transform values.
+#action:
+# Special action can be executed. Supports [back, exit] menu commands
+# and [respond response_info] command. Respond command will send '// response_info' to host.
+
+#[menu input1]
+#name:
+#cursor:
+#width:
+#enable:
+#transform:
+#parameter:
+# Value from parameter (always index 0) is taken as input value when in edit mode.
+#gcode:
+# This will be triggered in realtime or on exit from edit mode.
+#reverse:
+# This attribute accepts static boolean value.
+# When enabled it will reverse increment and decrement directions for input.
+# The default is False. This parameter is optional.
+#readonly:
+# This attribute accepts same logical expression as 'enable'.
+# When true then input element is readonly like 'item' and cannot enter to edit mode.
+# The default is False. This parameter is optional.
+#realtime:
+# This attribute accepts static boolean value.
+# When enabled it will execute gcode after each value change.
+# The default is False. This parameter is optional.
+#input_min:
+# It accepts integer or float value. Will set minimal bound for edit value.
+# The default is 2.2250738585072014e-308. This parameter is optional.
+#input_max:
+# It accepts integer or float value. Will set maximal bound for edit value.
+# The default is 1.7976931348623157e+308. This parameter is optional.
+#input_step:
+# This is mandatory attribute for input.
+# It accepts positive integer or float value. Will determine increment
+# and decrement steps for edit value.
+
+#[menu list1]
+#type:list or vsdcard
+#name:
+#cursor:
+#width:
+#scroll:
+#enable:
+#enter_gcode:
+# Will trigger gcode script when entering to this menu container.
+# This parameter is optional.
+#leave_gcode:
+# Will trigger gcode script when leaving from this menu container.
+# This parameter is optional.
+#show_back:
+# This attribute accepts static boolean value.
+# Show back [..] as first element.
+# The default is True. This parameter is optional.
+#show_title:
+# This attribute accepts static boolean value.
+# Show container name next to back [..] element.
+# The default is True. This parameter is optional.
+#items:
+# Menu elements listed in this container.
+# Each element must be on separate line.
+# Elements can be grouped on same line by separating them with comma
+#
+# When element name stars with . then menu system will add parent
+# container config name as prefix to element name (delimited by space)
+
+#[menu infodeck]
+#type: deck
+#name:
+#cursor:
+#width:
+#scroll:
+#enable:
+#enter_gcode
+#leave_gcode
+#longpress_menu:
+# Entry point to menu container. When this attribute is set then
+# long press > 1s will initiate this menu container if not in edit mode.
+# The default is disabled. This parameter is optional.
+#items:
+# It accepts only 'card' elements. You are able to switch between different card screens
+# by using encoder or up/down buttons.
+
+#[menu card1]
+#type: card
+#name:
+#content:
+# Card screen content. Each line represents display line.
+# Quotes can be used in the beginning and end of line.
+# Rendered elements are available for output formatting as {0}..{x}. It's always string type.
+#items:
+# List of elements in card. Each line represents a single index for content formatting.
+# It's possible to show multiple elements in one place by separating them with comma on single line.
+# If first element is integer then timed cycle is used (integer value is cycle time in seconds)
+# If no integer element then first enabled element is shown.
+# In cycler multiple elements can be grouped into one postition by separating them with |
+# This way only simple menu items can be grouped.
+# Example: 5,prt_time, prt_progress - elements prt_time and prt_progress are switched after 5s
+# Example: msg,xpos|ypos - elements xpos and ypos are grouped and showed together when msg is disabled.