display menu module for klipper

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt 2018-08-20 13:15:12 +03:00 committed by KevinOConnor
parent 3387cccdcf
commit 65f0fd6238
5 changed files with 2586 additions and 0 deletions

View File

@ -650,6 +650,33 @@
#a0_pin
# The pins connected to an uc1701 type lcd. These parameters must be
# provided when using an uc1701 display.
#menu_root:
# Entry point for menu, root menu container name. If this parameter
# is not provided then default menu root is used. When provided
# menu entry is 'deck' type then it'll be initiated immediately at startup.
# Description of menu items is located in example-menu.cfg file.
#menu_timeout:
# Timeout for menu. Being inactive this amount of seconds will trigger
# menu exit or return to root menu when having autorun enabled.
# The default is 0 seconds (disabled)
#encoder_pins:
# The pins connected to encoder. 2 pins must be provided when
# using encoder. This parameter must be provided when using menu.
#click_pin:
# The pin connected to 'enter' button or encoder 'click'. This parameter
# must be provided when using menu.
#back_pin:
# The pin connected to 'back' button. This parameter is optional, menu
# can be used without it.
#up_pin:
# The pin connected to 'up' button. This parameter must be provided
# when using menu without encoder.
#down_pin:
# The pin connected to 'down' button. This parameter must be provided
# when using menu without encoder.
#kill_pin:
# The pin connected to 'kill' button. This button will call
# emergency stop.
# Custom thermistors (one may define any number of sections with a
# "thermistor" prefix). A custom thermistor may be used in the

181
config/example-menu.cfg Normal file
View File

@ -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.

View File

@ -7,6 +7,7 @@
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging
import hd44780, st7920, uc1701, icons
import menu
LCD_chips = { 'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780, 'uc1701' : uc1701.UC1701 }
M73_TIMEOUT = 5.
@ -17,6 +18,8 @@ class PrinterLCD:
self.reactor = self.printer.get_reactor()
self.lcd_chip = config.getchoice('lcd_type', LCD_chips)(config)
self.lcd_type = config.get('lcd_type')
# menu
self.menu = menu.MenuManager(config, self.lcd_chip)
# printer objects
self.gcode = self.toolhead = self.sdcard = None
self.fan = self.extruder0 = self.extruder1 = self.heater_bed = None
@ -89,6 +92,11 @@ class PrinterLCD:
self.lcd_chip.write_graphics(x, y, 15, [0xff]*width)
# Screen updating
def screen_update_event(self, eventtime):
# update menu component
ret = self.menu.screen_update_event(eventtime)
if ret:
return ret
# update all else
self.lcd_chip.clear()
if self.lcd_type == 'hd44780':
self.screen_update_hd44780(eventtime)

View File

@ -0,0 +1,933 @@
# This file serves as default menu structure.
# See the "example-menu.cfg" file for description of common config parameters.
### DEFAULT MENU ###
### menu main ###
[menu __main]
type: list
name: Main Menu
items:
__octoprint
__sdcard
__control
__temp
__filament
__prepare
__test
### menu octoprint ###
[menu __octoprint]
type: list
name: OctoPrint
items:
.__pause
.__resume
.__abort
[menu __octoprint __pause]
type: command
enable: toolhead.is_printing
name: Pause printing
action: respond action:pause
gcode:
[menu __octoprint __resume]
type: command
enable: toolhead.is_printing
name: Resume printing
action: respond action:resume
gcode:
[menu __octoprint __abort]
type: command
enable: toolhead.is_printing
name: Abort printing
action: respond action:cancel
gcode:
### menu virtual sdcard ###
[menu __sdcard]
type: vsdcard
name: SD Card
items:
.__start
.__resume
.__pause
[menu __sdcard __start]
type: command
enable: !toolhead.is_printing
name: Start printing
gcode: M24
[menu __sdcard __resume]
type: command
enable: toolhead.is_printing
name: Resume printing
gcode: M24
[menu __sdcard __pause]
type: command
enable: toolhead.is_printing
name: Pause printing
gcode: M25
### menu control ###
[menu __control]
type: list
name: Control
items:
.__home
.__homez
.__homexy
.__move_10mm
.__move_1mm
.__move_01mm
.__disable
.__fanonoff
.__fanspeed
.__caselightonoff
.__caselightpwm
[menu __control __home]
type: command
name: Home All
gcode: G28
enable: !toolhead.is_printing
[menu __control __homez]
type: command
enable: !toolhead.is_printing
name: Home Z
gcode: G28 Z
[menu __control __homexy]
type: command
enable: !toolhead.is_printing
name: Home X/Y
gcode: G28 X Y
[menu __control __disable]
type: command
name: Disable steppers
gcode:
M84
M18
[menu __control __fanonoff]
type: input
enable: fan.is_enabled
name: Fan {1:3s}
parameter: fan.speed
transform:
choose('OFF','ON')
choose(0,255)
input_min: 0
input_max: 1
input_step: 1
gcode: M106 S{2:d}
[menu __control __fanspeed]
type: input
enable: fan.is_enabled
name: Fan speed: {1:3d}%
parameter: fan.speed
transform:
map(0,1,0,100)
map(0,1,0,255)
input_min: 0
input_max: 1
input_step: 0.01
gcode: M106 S{2:d}
[menu __control __caselightonoff]
type: input
enable: output_pin.caselight.is_enabled
name: Case light: {1:3s}
parameter: output_pin.caselight.value
transform:
choose('OFF','ON')
choose(0,1)
input_min: 0
input_max: 1
input_step: 1
gcode: SET_PIN PIN=caselight VALUE={2}
[menu __control __caselightpwm]
type: input
enable: output_pin.caselight.is_enabled
name: Case light: {0:4.0%}
parameter: output_pin.caselight.value
input_min: 0.0
input_max: 1.0
input_step: 0.01
gcode: SET_PIN PIN=caselight VALUE={0:.2f}
### menu move 10mm ###
[menu __control __move_10mm]
type: list
enable: !toolhead.is_printing
name: Move 10mm
items:
.__axis_z
.__axis_x, .__axis_y
.__axis_e
[menu __control __move_10mm __axis_x]
type: input
name: "X:{0:05.1f} "
parameter: toolhead.xpos
input_min: 0
input_max: 200.0
input_step: 10.0
gcode: G1 X{0:.1f}
[menu __control __move_10mm __axis_y]
type: input
name: "Y:{0:05.1f} "
parameter: toolhead.ypos
input_min: 0
input_max: 200.0
input_step: 10.0
gcode: G1 Y{0:.1f}
[menu __control __move_10mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
parameter: toolhead.zpos
input_min: 0
input_max: 200.0
input_step: 10.0
gcode: G1 Z{0:.1f}
[menu __control __move_10mm __axis_e]
type: input
enable: !toolhead.is_printing
name: "Move E:{0:+06.1f}"
parameter: 0
input_min: -250.0
input_max: 250.0
input_step: 10.0
gcode: G1 E{0:.1f} F240
### menu move 1mm ###
[menu __control __move_1mm]
type: list
enable: !toolhead.is_printing
name: Move 1mm
items:
.__axis_z
.__axis_x, .__axis_y
.__axis_e
[menu __control __move_1mm __axis_x]
type: input
name: "X:{0:05.1f} "
parameter: toolhead.xpos
input_min: 0
input_max: 100.0
input_step: 1.0
gcode: G1 X{0:.1f}
[menu __control __move_1mm __axis_y]
type: input
name: "Y:{0:05.1f} "
parameter: toolhead.ypos
input_min: 0
input_max: 100.0
input_step: 1.0
gcode: G1 Y{0:.1f}
[menu __control __move_1mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
parameter: toolhead.zpos
input_min: 0
input_max: 100.0
input_step: 1.0
gcode: G1 Z{0:.1f}
[menu __control __move_1mm __axis_e]
type: input
enable: !toolhead.is_printing
name: "Move E:{0:+06.1f}"
parameter: 0
input_min: -100.0
input_max: 100.0
input_step: 1.0
gcode: G1 E{0:.1f} F240
### menu move 0.1mm ###
[menu __control __move_01mm]
type: list
enable: !toolhead.is_printing
name: Move 0.1mm
items:
.__axis_z
.__axis_x, .__axis_y
.__axis_e
[menu __control __move_01mm __axis_x]
type: input
name: "X:{0:05.1f} "
parameter: toolhead.xpos
input_min: 0
input_max: 50.0
input_step: 0.1
gcode: G1 X{0:.1f}
[menu __control __move_01mm __axis_y]
type: input
name: "Y:{0:05.1f} "
parameter: toolhead.ypos
input_min: 0
input_max: 50.0
input_step: 0.1
gcode: G1 Y{0:.1f}
[menu __control __move_01mm __axis_z]
type: input
enable: !toolhead.is_printing
name: "Move Z:{0:05.1f}"
parameter: toolhead.zpos
input_min: 0
input_max: 50.0
input_step: 0.1
gcode: G1 Z{0:.1f}
[menu __control __move_01mm __axis_e]
type: input
enable: !toolhead.is_printing
name: "Move E:{0:+06.1f}"
parameter: 0
input_min: -50.0
input_max: 50.0
input_step: 0.1
gcode: G1 E{0:.1f} F240
### menu temperature ###
[menu __temp]
type: list
name: Temperature
items:
.__hotend0_current, .__hotend0_target
.__hotend1_current, .__hotend1_target
.__hotbed_current, .__hotbed_target
.__preheat_pla
.__preheat_abs
.__cooldown
[menu __temp __hotend0_current]
type: item
enable: extruder0.is_enabled
name: "Ex0:{0:4.0f} T"
parameter: extruder0.temperature
[menu __temp __hotend0_target]
type: input
enable: extruder0.is_enabled
name: "{0:4.0f}"
parameter: extruder0.target
input_min: 0
input_max: 250
input_step: 1
gcode: M104 T0 S{0:.0f}
[menu __temp __hotend1_current]
type: item
enable: extruder1.is_enabled
name: "Ex1:{0:4.0f} T"
parameter: extruder1.temperature
[menu __temp __hotend1_target]
type: input
enable: extruder1.is_enabled
name: "{0:4.0f}"
parameter: extruder1.target
input_min: 0
input_max: 250
input_step: 1
gcode: M104 T1 S{0:.0f}
[menu __temp __hotbed_current]
type: item
enable: heater_bed.is_enabled
name: "Bed:{0:4.0f} T"
parameter: heater_bed.temperature
[menu __temp __hotbed_target]
type: input
enable: heater_bed.is_enabled
name: "{0:4.0f}"
parameter: heater_bed.target
input_min: 0
input_max: 130
input_step: 1
gcode: M140 S{0:.0f}
[menu __temp __preheat_pla]
type: list
name: Preheat PLA
items:
.__all
.__hotend
.__hotbed
[menu __temp __preheat_pla __all]
type: command
enable: extruder0.is_enabled,heater_bed.is_enabled
name: Preheat all
gcode:
M140 S60
M104 S200
[menu __temp __preheat_pla __hotend]
type: command
enable: extruder0.is_enabled
name: Preheat hotend
gcode: M104 S200
[menu __temp __preheat_pla __hotbed]
type: command
enable: heater_bed.is_enabled
name: Preheat hotbed
gcode: M140 S60
[menu __temp __preheat_abs]
type: list
name: Preheat ABS
items:
.__all
.__hotend
.__hotbed
[menu __temp __preheat_abs __all]
type: command
enable: extruder0.is_enabled,heater_bed.is_enabled
name: Preheat all
gcode:
M140 S110
M104 S245
[menu __temp __preheat_abs __hotend]
type: command
enable: extruder0.is_enabled
name: Preheat hotend
gcode: M104 S245
[menu __temp __preheat_abs __hotbed]
type: command
enable: heater_bed.is_enabled
name: Preheat hotbed
gcode: M140 S110
[menu __temp __cooldown]
type: list
name: Cooldown
items:
.__all
.__hotend
.__hotbed
[menu __temp __cooldown __all]
type: command
enable: extruder0.is_enabled,heater_bed.is_enabled
name: Cooldown all
gcode:
M104 S0
M140 S0
[menu __temp __cooldown __hotend]
type: command
enable: extruder0.is_enabled
name: Cooldown hotend
gcode: M104 S0
[menu __temp __cooldown __hotbed]
type: command
enable: heater_bed.is_enabled
name: Cooldown hotbed
gcode: M140 S0
### menu filament ###
[menu __filament]
type: list
name: Filament
items:
__temp __hotend0_current, __temp __hotend0_target
.__unload
.__load
.__feed
[menu __filament __load]
type: command
name: Load Filament
gcode:
G1 E200 F1000
G1 E100 F300
[menu __filament __unload]
type: command
name: Unload Filament
gcode:
G1 E-200 F1000
G1 E-200 F1800
[menu __filament __feed]
type: input
name: Feed Filament: {0:.1f}
parameter: toolhead.epos
input_step: 0.1
gcode: G1 E{0:.1f} F30
### menu prepare ###
[menu __prepare]
type: list
enable: !toolhead.is_printing
name: Prepare
items:
.__delta_calib
.__bedprobe
.__hotend_pid_tuning
.__hotbed_pid_tuning
.__host_restart
.__firmware_restart
[menu __prepare __host_restart]
type: command
enable: !toolhead.is_printing
name: Restart host
gcode: RESTART
[menu __prepare __firmware_restart]
type: command
enable: !toolhead.is_printing
name: Restart FW
gcode: FIRMWARE_RESTART
[menu __prepare __delta_calib]
type: command
enable: !toolhead.is_printing
name: Delta calibrate
gcode: DELTA_CALIBRATE
[menu __prepare __bedprobe]
type: command
enable: !toolhead.is_printing
name: Bed probe
gcode: PROBE
[menu __prepare __hotend_pid_tuning]
type: command
enable: !toolhead.is_printing, extruder0.is_enabled
name: Tune Hotend PID
gcode: PID_CALIBRATE HEATER=extruder TARGET=210 WRITE_FILE=1
[menu __prepare __hotbed_pid_tuning]
type: command
enable: !toolhead.is_printing, heater_bed.is_enabled
name: Tune Hotbed PID
gcode: PID_CALIBRATE HEATER=heater_bed TARGET=60 WRITE_FILE=1
### test menu ###
[menu __test]
type: list
name: Test menu
items:
.__scroll
.__dump
[menu __test __scroll]
type: item
name: This is very long item name
width: 18
scroll: true
[menu __test __dump]
type: command
name: Dump parameters
gcode: MENU DO=dump
### info screens ###
[menu __screen2004_static]
type: deck
name: Deck (static)
longpress_menu: __main
items: __card2004_static
[menu __screen2004_input]
type: deck
name: Deck (input)
longpress_menu: __main
items: __card2004_input
[menu __screen1604_static]
type: deck
name: Deck (static)
longpress_menu: __main
items: __card1604_static
[menu __screen1604_input]
type: deck
name: Deck (input)
longpress_menu: __main
items: __card1604_input
[menu __screen_test]
type: deck
name: Deck (test)
longpress_menu: __main
items: __card1, __card2, __card3
### deck cards ###
### special characters for hd44780
# \x00 - thermometer
# \x01 - heater_bed
# \x02 - speed_factor
# \x03 - clock
# \x04 - degrees
# \x05 - usb
# \x06 - sdcard
# \x7e - right arrow
[menu __card2004_static]
type: card
name: Card 20x04
content:
"\x00{0:3s}\x04\x7e{1:3s}\x04 {2}"
"\x01{3:3s}\x04\x7e{4:3s}\x04 \xa5{8}"
"fn{6} \x02{5} {7}"
"{9}"
items:
__card_hotend0_current
__card_hotend0_target
__card_zpos
__card_hotbed_current
__card_hotbed_target
__card_frpeed
__card_fnspeed
5,__card_prt_time, __card_usb_progress, __card_sdcard_progress
__card_status
__card_msg,__card_xpos|__card_ypos|__card_epos
[menu __card1604_static]
type: card
name: Card 16x04
content:
"E{0:3s}/{1:3s} {2}"
"B{3:3s}/{4:3s} fr{5}"
"fn{6} {7}"
"[{8}] {9}"
items:
__card_hotend0_current
__card_hotend0_target
__card_zpos
__card_hotbed_current
__card_hotbed_target
__card_frpeed
__card_fnspeed
5,__card_prt_time_2, __card_usb_progress_2, __card_sdcard_progress_2
__card_status_slim
__card_msg_slim,__card_xpos|__card_ypos
[menu __card2004_input]
type: card
name: Card 20x04
content:
"\x00{0:3s}\x04\x7e{1:3s}\x04 {2}"
"\x01{3:3s}\x04\x7e{4:3s}\x04 \xa5{8}"
"fn{6} \x02{5} {7}"
"{9}"
items:
__card_hotend0_current
__card_hotend0_target_in
__card_zpos
__card_hotbed_current
__card_hotbed_target_in
__card_frpeed_in
__card_fnspeed
5,__card_prt_time, __card_usb_progress, __card_sdcard_progress
__card_status
__card_msg,__card_xpos|__card_ypos|__card_epos
[menu __card1604_input]
type: card
name: Card 16x04
content:
"E{0:3s}/{1:3s} {2}"
"B{3:3s}/{4:3s} fr{5}"
"fn{6} {7}"
"[{8}] {9}"
items:
__card_hotend0_current
__card_hotend0_target_in
__card_zpos
__card_hotbed_current
__card_hotbed_target_in
__card_frpeed_in
__card_fnspeed
5,__card_prt_time_2, __card_usb_progress_2, __card_sdcard_progress_2
__card_status_slim
__card_msg,__card_xpos|__card_ypos
[menu __card1]
type: card
name: Card 1
content:
"E0:{0:3s}/{1:3s} B:{4:3s}/{5:3s}"
"E1:{2:3s}/{3:3s} {6}"
"Fr{7}Fn{8} {9}"
"{10}"
items:
__card_hotend0_current
__card_hotend0_target
__card_hotend1_current
__card_hotend1_target
__card_hotbed_current
__card_hotbed_target
__card_zpos
__card_frpeed_in
__card_fnspeed_in
5,__card_prt_time, __card_usb_progress, __card_sdcard_progress
__card_msg
[menu __card2]
type: card
name: Card 2
content:
"E:{0:3s}/{1:3s} B:{2:3s}/{3:3s}"
"{4}{5}{6}"
"Fr{7} {8} T{9}"
"{10}"
items:
__card_hotend0_current
__card_hotend0_target
__card_hotbed_current
__card_hotbed_target
__card_xpos
__card_ypos
__card_zpos
__card_frpeed_in
__card_usb_progress_2, __card_sdcard_progress_2
__card_prt_time_2
__card_msg
[menu __card3]
type: card
name: Card 3
content:
"Example card :)"
"Try this menu."
"({0})"
items:
__test
### card items ###
[menu __card_hotend0_current]
type: item
enable: extruder0.is_enabled
name: "{1:3.0f}"
parameter: extruder0.temperature
transform: abs()
[menu __card_hotend0_target]
type: item
enable: extruder0.is_enabled
name: "{1:3.0f}"
parameter: extruder0.target
transform: abs()
[menu __card_hotend0_target_in]
type: input
enable: extruder0.is_enabled
name: "{1:3.0f}"
parameter: extruder0.target
transform: abs()
input_min: 0
input_max: 250
input_step: 1
gcode: M104 T0 S{0:.0f}
[menu __card_hotend1_current]
type: item
enable: extruder1.is_enabled
name: "{1:3.0f}"
parameter: extruder1.temperature
transform: abs()
[menu __card_hotend1_target]
type: item
enable: extruder1.is_enabled
name: "{1:3.0f}"
parameter: extruder1.target
transform: abs()
[menu __card_hotend1_target_in]
type: input
enable: extruder1.is_enabled
name: "{1:3.0f}"
parameter: extruder1.target
transform: abs()
input_min: 0
input_max: 250
input_step: 1
gcode: M104 T1 S{0:.0f}
[menu __card_hotbed_current]
type: item
enable: heater_bed.is_enabled
name: "{1:3.0f}"
parameter: heater_bed.temperature
transform: abs()
[menu __card_hotbed_target]
type: item
enable: heater_bed.is_enabled
name: "{1:3.0f}"
parameter: heater_bed.target
transform: abs()
[menu __card_hotbed_target_in]
type: input
enable: heater_bed.is_enabled
name: "{1:3.0f}"
parameter: heater_bed.target
transform: abs()
input_min: 0
input_max: 250
input_step: 1
gcode: M140 S{0:.0f}
[menu __card_zpos]
type: item
name: "Z{0:06.2f}"
parameter: toolhead.zpos
[menu __card_xpos]
type: item
name: "X{0:05.1f}{2}"
parameter: toolhead.xpos, menu.is20xx
transform:
1.choose('',' ')
[menu __card_ypos]
type: item
name: "Y{0:05.1f}{2}"
parameter: toolhead.ypos, menu.is20xx
transform:
1.choose('',' ')
[menu __card_epos]
type: item
name: "E{0:05.1f}{2}"
parameter: toolhead.epos, menu.is20xx
transform:
1.choose('',' ')
[menu __card_frpeed]
type: item
name: "{0:4.0%}"
parameter: gcode.speed_factor
[menu __card_fnspeed]
type: item
name: "{0:4.0%}"
parameter: fan.speed
[menu __card_frpeed_in]
type: input
name: "{0:4.0%}"
parameter: gcode.speed_factor
transform:
map(0,1,0,255)
input_min: 0
input_max: 1
input_step: 0.01
gcode: M220 S{1:d}
[menu __card_fnspeed_in]
type: input
enable: fan.is_enabled
name: "{0:4.0%}"
parameter: fan.speed
transform:
map(0,1,0,255)
input_min: 0
input_max: 1
input_step: 0.01
gcode: M106 S{1:d}
[menu __card_prt_time]
type: item
name: "\x03{1:02d}:{2:02d}"
transform:
minutes()
seconds()
parameter: toolhead.printing_time
[menu __card_prt_time_2]
type: item
name: "T{1:02d}:{2:02d}"
transform:
minutes()
seconds()
parameter: toolhead.printing_time
[menu __card_usb_progress]
type: item
enable: !virtual_sdcard.progress, display.progress
name: "\x05{0:3.0f}%"
parameter: display.progress
[menu __card_sdcard_progress]
type: item
enable: virtual_sdcard.is_enabled, virtual_sdcard.progress
name: "\x06{0:3.0f}%"
parameter: virtual_sdcard.progress
[menu __card_usb_progress_2]
type: item
#enable: !virtual_sdcard.progress,display.progress
name: "pr{0:3.0f}%"
parameter: display.progress
[menu __card_sdcard_progress_2]
type: item
enable: virtual_sdcard.is_enabled, virtual_sdcard.progress
name: "pr{0:3.0f}%"
parameter: virtual_sdcard.progress
[menu __card_msg]
enable: display.message
type: item
scroll: true
width: 20
name: "{0}"
parameter: display.message
[menu __card_msg_slim]
enable: display.message
type: item
scroll: true
width: 12
name: "{0}"
parameter: display.message
[menu __card_status]
type: item
name: "{0}"
width: 5
parameter: toolhead.status
[menu __card_status_slim]
type: item
name: "{0}"
width: 1
parameter: toolhead.status

File diff suppressed because it is too large Load Diff