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

STEAPP-490: added condition for do offset when triggered filament sensor, make offset only for first layer. #129

Merged
merged 4 commits into from
Jun 23, 2023
Merged
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
9 changes: 3 additions & 6 deletions stereotech_config/filament_control_2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gcode:
SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=count_trigered_sensor VALUE=0
{% else %}
SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION VARIABLE=count_trigered_sensor VALUE={printer["gcode_macro RECOVER_EXTRUSION"].count_trigered_sensor + 1}
{% if printer["gcode_macro RECOVER_EXTRUSION"].enable_offset and printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made < printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_count %}
{% if printer.print_stats.info.current_layer == 0 and printer["gcode_macro RECOVER_EXTRUSION"].enable_offset and printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made < printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_count %}
{action_respond_warning('Recover extrusion by offset %s' % printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made)}
RECOVER_EXTRUSION_BY_OFFSET
{% else %}
Expand Down Expand Up @@ -97,11 +97,8 @@ gcode:
{% if params.RESET %}
{% set reset_value = printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].check_value * printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made %}
SET_GCODE_VARIABLE MACRO=RECOVER_EXTRUSION_BY_OFFSET VARIABLE=checks_made VALUE=0
{% if printer.gcode_move.current_wcs == 0 %}
SET_GCODE_OFFSET Z_ADJUST=-{reset_value} MOVE=1
{% else %}
G10 L2 P0 R1 Z-{reset_value}
{% endif %}
; G10 L2 P0 R1 Z-{reset_value}
SET_GCODE_OFFSET Z_ADJUST=-{reset_value} MOVE=1
{% else %}
M117 recover_extrusion_by_offset_attempt_{printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made + 1}
{% if printer.gcode_move.current_wcs == 0 %}
Expand Down