menu: Update menu.cfg sd_card menu enable condition (#3826)

Change SD card enable condition and add Cancel printing option.

Signed-off-by: John Smith <login721@gmail.com>
This commit is contained in:
Chip 2021-01-25 00:35:05 +09:00 committed by GitHub
parent ccaf58a02c
commit b9899a23a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 5 deletions

View File

@ -18,6 +18,7 @@
# + Start printing
# + Resume printing
# + Pause printing
# + Cancel printing
# + ... (files)
# + Control
# + Home All
@ -164,21 +165,50 @@ name: SD Card
[menu __main __sdcard __start]
type: command
enable: {('virtual_sdcard' in printer) and not printer.idle_timeout.state == "Printing"}
enable: {('virtual_sdcard' in printer) and (printer.print_stats.state == "standby" or printer.print_stats.state == "error" or printer.print_stats.state == "complete")}
name: Start printing
gcode: M24
[menu __main __sdcard __resume]
type: command
enable: {('virtual_sdcard' in printer) and printer.idle_timeout.state == "Printing"}
enable: {('virtual_sdcard' in printer) and printer.print_stats.state == "pause"}
name: Resume printing
gcode: M24
gcode:
{% if "pause_resume" in printer %}
RESUME
{% else %}
M24
{% endif %}
[menu __main __sdcard __pause]
type: command
enable: {('virtual_sdcard' in printer) and printer.idle_timeout.state == "Printing"}
enable: {('virtual_sdcard' in printer) and printer.print_stats.state == "printing"}
name: Pause printing
gcode: M25
gcode:
{% if "pause_resume" in printer %}
PAUSE
{% else %}
M25
{% endif %}
[menu __main __sdcard __cancel]
type: command
enable: {('virtual_sdcard' in printer) and (printer.print_stats.state == "printing" or printer.print_stats.state == "pause")}
name: Cancel printing
gcode:
{% if 'pause_resume' in printer %}
CANCEL_PRINT
{% else %}
M25
M27
M26 S0
TURN_OFF_HEATERS
{% if printer.toolhead.position.z <= printer.toolhead.axis_maximum.z - 5 %}
G91
G0 Z5 F1000
G90
{% endif %}
{% endif %}
### menu control ###
[menu __main __control]