Skip to content

Commit

Permalink
added a fix for filament sensor activation for material as default (#582
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Surion79 authored Jun 18, 2024
1 parent 8e2b41a commit cfd9305
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions macros/base/start_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ gcode:
{% else %}
RESPOND MSG="Material '{MATERIAL}' is used"
{% set material = printer["gcode_macro _USER_VARIABLES"].material_parameters[MATERIAL] %}
{% if filament_sensor_enabled %}
{% set filament_sensor_enabled = material.filament_sensor | default(1) %}
{% endif %}
{% endif %}



# --------------------------------
# Let's do the START_PRINT actions
# --------------------------------
Expand Down Expand Up @@ -195,7 +197,7 @@ gcode:
START_FILTER SPEED={material.filter_speed / 100}
{% endif %}

{% if filament_sensor_enabled and not material.filament_sensor %}
{% if filament_sensor_enabled %}
SET_FILAMENT_SENSOR SENSOR="runout_sensor" ENABLE=0
{% endif %}

Expand Down

0 comments on commit cfd9305

Please sign in to comment.