aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display
diff options
context:
space:
mode:
authorChip <login721@gmail.com>2021-01-25 00:35:05 +0900
committerGitHub <noreply@github.com>2021-01-24 10:35:05 -0500
commitb9899a23a3aa4d8704729155d3e9fbadf9056a2f (patch)
tree50f7436df84ca8beeaee117b308977e92d77474c /klippy/extras/display
parentccaf58a02cf132cb43ad3f45f5200841044f66a8 (diff)
downloadkutter-b9899a23a3aa4d8704729155d3e9fbadf9056a2f.tar.gz
kutter-b9899a23a3aa4d8704729155d3e9fbadf9056a2f.tar.xz
kutter-b9899a23a3aa4d8704729155d3e9fbadf9056a2f.zip
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>
Diffstat (limited to 'klippy/extras/display')
-rw-r--r--klippy/extras/display/menu.cfg40
1 files changed, 35 insertions, 5 deletions
diff --git a/klippy/extras/display/menu.cfg b/klippy/extras/display/menu.cfg
index 0d4a5c4f..d7c10587 100644
--- a/klippy/extras/display/menu.cfg
+++ b/klippy/extras/display/menu.cfg
@@ -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]