Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added variable for timeout handling #525

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions config/machine.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@ on_error_gcode:
{% if "xyz" in printer.toolhead.homed_axes %}
PARK
{% endif %}


[idle_timeout]
timeout: 1800
gcode:
{% set disable_motors = printer["gcode_macro _USER_VARIABLES"].disable_motors_on_timeout|default(1)|int %}
RESPOND MSG="Idle timeout reached"
TURN_OFF_HEATERS
M84

{% if disable_motors %}
M84
{% endif %}

{% if printer["gcode_macro _USER_VARIABLES"].light_enabled %}
LIGHT_OFF
{% endif %}

{% if printer["gcode_macro _USER_VARIABLES"].status_leds_enabled %}
STATUS_LEDS COLOR="OFF"
{% endif %}
Expand Down
2 changes: 2 additions & 0 deletions user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ variable_disable_motors_in_end_print: False
## Automatically turn-off heaters in the END_PRINT macro
variable_turn_off_heaters_in_end_print: True

## Automatically disable motors on timeout
variable_disable_motors_on_timeout: False
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the default to True here? The goal is to align it with the default(1) from the macro


#########################################################
# Dockable probe variables (if available in the machine)
Expand Down