From 2529eea491744eadd680d3cb0336627e42093149 Mon Sep 17 00:00:00 2001 From: Desuuuu Date: Tue, 27 Apr 2021 13:30:33 +0200 Subject: [PATCH] handle pause/resume/cancel when using virtual SD Fixes #39 --- klippy/extras/t5uid1/dgus_reloaded/vars_in.cfg | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/klippy/extras/t5uid1/dgus_reloaded/vars_in.cfg b/klippy/extras/t5uid1/dgus_reloaded/vars_in.cfg index c259560e..dd587b62 100644 --- a/klippy/extras/t5uid1/dgus_reloaded/vars_in.cfg +++ b/klippy/extras/t5uid1/dgus_reloaded/vars_in.cfg @@ -30,7 +30,11 @@ script: {% set t5uid1 = printer.t5uid1 %} {% if data == t5uid1.constants.popup_confirmed %} {% if t5uid1.is_printing %} - RESPOND TYPE=command MSG=action:cancel + {% if 'virtual_sdcard' in printer and printer.virtual_sdcard.is_active %} + CANCEL_PRINT + {% else %} + RESPOND TYPE=command MSG=action:cancel + {% endif %} {% endif %} {% do start_routine("trigger_full_update") %} {% endif %} @@ -44,7 +48,11 @@ script: {% set t5uid1 = printer.t5uid1 %} {% if data == t5uid1.constants.popup_confirmed %} {% if t5uid1.is_printing and not printer.pause_resume.is_paused %} - RESPOND TYPE=command MSG=action:pause + {% if 'virtual_sdcard' in printer and printer.virtual_sdcard.is_active %} + PAUSE + {% else %} + RESPOND TYPE=command MSG=action:pause + {% endif %} {% endif %} {% do start_routine("trigger_full_update") %} {% endif %} @@ -58,7 +66,11 @@ script: {% set t5uid1 = printer.t5uid1 %} {% if data == t5uid1.constants.popup_confirmed %} {% if t5uid1.is_printing and printer.pause_resume.is_paused %} - RESPOND TYPE=command MSG=action:resume + {% if 'virtual_sdcard' in printer and printer.virtual_sdcard.is_active %} + RESUME + {% else %} + RESPOND TYPE=command MSG=action:resume + {% endif %} {% endif %} {% do start_routine("trigger_full_update") %} {% endif %}