Update to current running config

Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
This commit is contained in:
Thomas 2022-01-16 18:28:19 +01:00
parent 3e184f03ad
commit 7b2ce94b70
5 changed files with 708 additions and 2 deletions

450
display.cfg Normal file
View File

@ -0,0 +1,450 @@
# This file defines the default layout of the printer's lcd display.
# It is not necessary to edit this file to change the display.
# Instead, one may override any of the sections defined here by
# defining a section with the same name in the main printer.cfg config
# file.
######################################################################
# 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/%.0f" % (heater.temperature, heater.target) }
~degrees~
{% endif %}
[display_template _printing_time]
text:
{% set ptime = printer.idle_timeout.printing_time %}
{% set rtime = printer["gcode_macro M73"].rtime %}
{ "P%02d:%02d R%02d:%02d" % (ptime // (60 * 60), (ptime // 60) % 60, rtime // 60, rtime % 60) }
[display_template _print_status]
text:
{% if printer.display_status.message %}
{ printer.display_status.message }
{% elif printer.idle_timeout.printing_time %}
{% 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_move.speed_factor) }
#
# Progress bar
#
[display_data _default_16x4 print_progress]
position: 2, 0
#text: { "{:^5.0%}".format(printer.display_status.progress) }
text: ""
[display_data _default_16x4 progress_bar]
position: 2, 1 # Draw graphical progress bar after text is written
#text: { draw_progress_bar(2, 0, 5, printer.display_status.progress) }
text: ""
[display_data _default_16x4 printing_time]
position: 2, 1
text: { "%s" % (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, 5
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_move.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 16x4 glyphs
######################################################################
[display_glyph extruder]
data:
................
................
..************..
.....******.....
..************..
.....******.....
..************..
................
....********....
....******.*....
....********....
................
......****......
.......**.......
................
................
[display_glyph bed]
data:
................
................
................
................
................
................
................
................
................
................
................
...*********....
..*.........*...
.*************..
................
................
[display_glyph bed_heat1]
data:
................
................
..*....*....*...
.*....*....*....
..*....*....*...
...*....*....*..
..*....*....*...
.*....*....*....
..*....*....*...
................
................
...*********....
..*.........*...
.*************..
................
................
[display_glyph bed_heat2]
data:
................
................
..*....*....*...
...*....*....*..
..*....*....*...
.*....*....*....
..*....*....*...
...*....*....*..
..*....*....*...
................
................
...*********....
..*.........*...
.*************..
................
................
[display_glyph fan1]
data:
................
................
....***.........
...****....**...
...****...****..
....***..*****..
.....*....****..
.......**.......
.......**.......
..****....*.....
..*****..***....
..****...****...
...**....****...
.........***....
................
................
[display_glyph fan2]
data:
................
................
.......****.....
.......****.....
.......***......
..**...**.......
..***...........
..****.**.****..
..****.**.****..
...........***..
.......**...**..
......***.......
.....****.......
.....****.......
................
................
[display_glyph feedrate]
data:
................
................
***.***.***.**..
*...*...*...*.*.
**..**..**..*.*.
*...*...*...*.*.
*...***.***.**..
................
**...*..***.***.
*.*.*.*..*..*...
**..***..*..**..
*.*.*.*..*..*...
*.*.*.*..*..***.
................
................
................
# In addition to the above glyphs, 16x4 displays also have the
# following hard-coded single character glyphs: right_arrow, degrees.
######################################################################
# Default 20x4 glyphs
######################################################################
[display_glyph extruder]
hd44780_slot: 0
hd44780_data:
..*..
.*.*.
.*.*.
.*.*.
.*.*.
*...*
*...*
.***.
[display_glyph bed]
hd44780_slot: 1
hd44780_data:
.....
*****
*.*.*
*...*
*.*.*
*****
.....
.....
[display_glyph bed_heat1]
hd44780_slot: 1
hd44780_data:
.*..*
*..*.
.*..*
*..*.
.....
*****
.....
.....
[display_glyph bed_heat2]
hd44780_slot: 1
hd44780_data:
*..*.
.*..*
*..*.
.*..*
.....
*****
.....
.....
[display_glyph fan]
hd44780_slot: 2
hd44780_data:
.....
*..**
**.*.
..*..
.*.**
**..*
.....
.....
[display_glyph feedrate]
hd44780_slot: 3
hd44780_data:
***..
*....
**...
*.***
..*.*
..**.
..*.*
.....
[display_glyph clock]
hd44780_slot: 4
hd44780_data:
.....
.***.
*..**
*.*.*
*...*
.***.
.....
.....
[display_glyph degrees]
hd44780_slot: 5
hd44780_data:
.**..
*..*.
*..*.
.**..
.....
.....
.....
.....
[display_glyph usb]
hd44780_slot: 6
hd44780_data:
.***.
.***.
.***.
*****
*****
*****
..*..
..*..
[display_glyph sd]
hd44780_slot: 6
hd44780_data:
.....
..***
.****
*****
*****
*****
*****
.....
# In addition to the above glyphs, 20x4 displays also have the
# following hard-coded glyphs: right_arrow.

View File

@ -2,10 +2,40 @@
# Macros # Macros
##################################################################### #####################################################################
[gcode_macro FILAMENT_STATE]
gcode:
SAVE_VARIABLE VARIABLE=filament_loaded VALUE={(params.LOADED | int) > 0}
[gcode_macro FILAMENT_CHANGE]
variable_state: 0
variable_allow_change: 0
gcode:
{% if params.STATE is defined %}
SET_GCODE_VARIABLE MACRO=FILAMENT_CHANGE VARIABLE=state VALUE={(params.STATE | int) > 0}
{% endif %}
{% if params.ALLOW_CHANGE is defined %}
SET_GCODE_VARIABLE MACRO=FILAMENT_CHANGE VARIABLE=allow_change VALUE={(params.ALLOW_CHANGE | int) > 0}
{% endif %}
[gcode_macro M73]
rename_existing: M73.1
variable_p: 0.0
variable_rtime: 0.0
gcode:
SET_GCODE_VARIABLE MACRO=M73 VARIABLE=rtime VALUE={params.R | int}
{% if params.P is defined %}
SET_GCODE_VARIABLE MACRO=M73 VARIABLE=p VALUE={params.P | int}
M73.1 P{params.P}
{% endif %}
[gcode_macro G32] [gcode_macro G32]
gcode: gcode:
BED_MESH_CLEAR {% if 'x' in printer.toolhead.homed_axes and 'y' in printer.toolhead.homed_axes %}
G28 Z
{% else %}
G28 G28
{% endif %}
QUAD_GANTRY_LEVEL QUAD_GANTRY_LEVEL
G0 X340 Y340 F18000 G0 X340 Y340 F18000
G28 G28
@ -35,6 +65,11 @@ gcode:
[gcode_macro PRINT_START] [gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice # Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode: gcode:
G28 X Y
M190 S{params.BED | int}
M109 S{params.EXTRUDER | int}
BED_MESH_CLEAR
G32 ; home all axes G32 ; home all axes
G1 Z20 F3000 ; move nozzle away from bed G1 Z20 F3000 ; move nozzle away from bed
@ -63,4 +98,4 @@ gcode:
M107 ; turn off fan M107 ; turn off fan
BED_MESH_CLEAR BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END RESTORE_GCODE_STATE NAME=STATE_PRINT_END

209
menu.cfg
View File

@ -1,3 +1,212 @@
[menu __main __temp __hotend0_target]
type: input
enable: {('extruder' in printer) and ('extruder' in printer.heaters.available_heaters)}
name: {"Ex0:%3.0f (%4.0f)" % (menu.input, printer.extruder.temperature)}
input: {printer.extruder.target}
input_min: 0
input_max: {printer.configfile.config.extruder.max_temp}
input_step: 1
gcode: M104 T0 S{'%.0f' % menu.input}
[menu __main __temp __hotend1_target]
type: input
enable: {('extruder1' in printer) and ('extruder1' in printer.heaters.available_heaters)}
name: {"Ex1:%3.0f (%4.0f)" % (menu.input, printer.extruder1.temperature)}
input: {printer.extruder1.target}
input_min: 0
input_max: {printer.configfile.config.extruder1.max_temp}
input_step: 1
gcode: M104 T1 S{'%.0f' % menu.input}
[menu __main __temp __hotbed_target]
type: input
enable: {'heater_bed' in printer}
name: {"Bed:%3.0f (%4.0f)" % (menu.input, printer.heater_bed.temperature)}
input: {printer.heater_bed.target}
input_min: 0
input_max: {printer.configfile.config.heater_bed.max_temp}
input_step: 1
gcode: M140 S{'%.0f' % menu.input}
[menu __main __temp __preheat_pla]
type: list
name: Preheat PLA
[menu __main __temp __preheat_pla __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Preheat all
gcode:
M140 S60
M104 S200
[menu __main __temp __preheat_pla __hotend]
type: command
enable: {'extruder' in printer}
name: Preheat hotend
gcode: M104 S200
[menu __main __temp __preheat_pla __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Preheat hotbed
gcode: M140 S60
[menu __main __temp __preheat_abs]
type: list
name: Preheat ABS
[menu __main __temp __preheat_abs __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Preheat all
gcode:
M140 S110
M104 S245
[menu __main __temp __preheat_abs __hotend]
type: command
enable: {'extruder' in printer}
name: Preheat hotend
gcode: M104 S245
[menu __main __temp __preheat_abs __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Preheat hotbed
gcode: M140 S110
[menu __main __temp __preheat_petg]
type: list
name: Preheat PETG
index: 4
[menu __main __temp __preheat_petg __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Preheat all
gcode:
M140 S60
M104 S230
[menu __main __temp __preheat_petg __hotend]
type: command
enable: {'extruder' in printer}
name: Preheat hotend
gcode: M104 S230
[menu __main __temp __preheat_petg __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Preheat hotbed
gcode: M140 S60
[menu __main __temp __cooldown]
type: list
name: Cooldown
[menu __main __temp __cooldown __all]
type: command
enable: {('extruder' in printer) and ('heater_bed' in printer)}
name: Cooldown all
gcode:
M104 S0
M140 S0
[menu __main __temp __cooldown __hotend]
type: command
enable: {'extruder' in printer}
name: Cooldown hotend
gcode: M104 S0
[menu __main __temp __cooldown __hotbed]
type: command
enable: {'heater_bed' in printer}
name: Cooldown hotbed
gcode: M140 S0
### menu filament ###
[menu __main __filament]
type: list
name: Filament
[menu __main __filament __preheat]
type: disabled
name: Preheat
[menu __main __filament __preheat __preheat_pla]
type: command
enable: {'heater_bed' in printer}
name: Preheat PLA
gcode:
M104 210
{menu.back(true, true)}
[menu __main __filament __preheat __preheat_petg]
type: command
enable: {'heater_bed' in printer}
name: Preheat PETG
gcode:
M104 230
{menu.back(true, true)}
[menu __main __filament __preheat __preheat_abs]
type: command
enable: {'heater_bed' in printer}
name: Preheat ABS
gcode:
M104 245
{menu.back(true, true)}
[menu __main __filament __hotend0_target]
type: input
enable: {'extruder' in printer}
name: {"Ex0:%3.0f (%4.0f)" % (menu.input, printer.extruder.temperature)}
input: {printer.extruder.target}
input_min: 0
input_max: {printer.configfile.config.extruder.max_temp}
input_step: 1
gcode: M104 T0 S{'%.0f' % menu.input}
[menu __main __filament __loadf]
type: disabled
[menu __main __filament __loads]
type: command
name: Load Filament
gcode:
SAVE_GCODE_STATE NAME=__filament__load
M83
G1 E50 F350
G1 E10 F350
RESTORE_GCODE_STATE NAME=__filament__load
[menu __main __filament __unloadf]
type: disabled
[menu __main __filament __unloads]
type: command
name: Unload Filament
gcode:
SAVE_GCODE_STATE NAME=__filament__load
M83
G1 E-50 F350
G1 E-10 F350
RESTORE_GCODE_STATE NAME=__filament__load
[menu __main __filament __feed]
type: input
name: Feed: {'%.1f' % menu.input}
input: 5
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__filament__load
M83
G1 E{'%.1f' % menu.input} F60
RESTORE_GCODE_STATE NAME=__filament__load
### menu move 10mm ### ### menu move 10mm ###
[menu __main __control __move_10mm] [menu __main __control __move_10mm]
type: list type: list

View File

@ -511,6 +511,14 @@ pin: EXP1_1
##################################################################### #####################################################################
[include macros.cfg] [include macros.cfg]
#####################################################################
# Display
#####################################################################
[include display.cfg]
[save_variables]
filename: /home/pi/Voron2_Config/variables.cfg
#*# <---------------------- SAVE_CONFIG ----------------------> #*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*# #*#

4
variables.cfg Normal file
View File

@ -0,0 +1,4 @@
[Variables]
filament_loaded = True
test = 'PLA,123,123'