handle pause/resume/cancel when using virtual SD

Fixes #39
This commit is contained in:
Desuuuu 2021-04-27 13:30:33 +02:00
parent 0d646c4a2e
commit 2529eea491
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
1 changed files with 15 additions and 3 deletions

View File

@ -30,7 +30,11 @@ script:
{% set t5uid1 = printer.t5uid1 %} {% set t5uid1 = printer.t5uid1 %}
{% if data == t5uid1.constants.popup_confirmed %} {% if data == t5uid1.constants.popup_confirmed %}
{% if t5uid1.is_printing %} {% 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 %} {% endif %}
{% do start_routine("trigger_full_update") %} {% do start_routine("trigger_full_update") %}
{% endif %} {% endif %}
@ -44,7 +48,11 @@ script:
{% set t5uid1 = printer.t5uid1 %} {% set t5uid1 = printer.t5uid1 %}
{% if data == t5uid1.constants.popup_confirmed %} {% if data == t5uid1.constants.popup_confirmed %}
{% if t5uid1.is_printing and not printer.pause_resume.is_paused %} {% 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 %} {% endif %}
{% do start_routine("trigger_full_update") %} {% do start_routine("trigger_full_update") %}
{% endif %} {% endif %}
@ -58,7 +66,11 @@ script:
{% set t5uid1 = printer.t5uid1 %} {% set t5uid1 = printer.t5uid1 %}
{% if data == t5uid1.constants.popup_confirmed %} {% if data == t5uid1.constants.popup_confirmed %}
{% if t5uid1.is_printing and printer.pause_resume.is_paused %} {% 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 %} {% endif %}
{% do start_routine("trigger_full_update") %} {% do start_routine("trigger_full_update") %}
{% endif %} {% endif %}