Skip to content

Commit

Permalink
feat(macro): random felt wipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Peck07 authored and frap129 committed Jul 11, 2024
1 parent 036c8ef commit 29e5689
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions config/gcode_macro.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,29 @@ gcode:
description: Wipe on the felt pad
gcode:
G90 ; absolute
; felt is roughly X60-88 (88 is the "cutter" end), Y254-250

{% set random_x = (range(0, 100) | random) / 10 %}
{% set X_end = 60 + random_x %}

{% set random_y = (range(0, 40) | random) / 10 %}
{% set Y_end = 254 - random_y %}
G1 Y{Y_end} F1500

{% set i = 3 %}
{% for iteration in range(i|int) %}
G1 X88 F500
G1 X65 F500
G1 X{X_end} F500
{% endfor %}

{% for iteration in range(i|int) %}
G1 Y249 F500
G1 Y254 F500
G1 Y{Y_end} F500
{% endfor %}
G1 Y253.5 F500

{% for iteration in range(i|int) %}
G1 X88 F500
G1 X63 F500
G1 X{X_end} F500
{% endfor %}


Expand Down

0 comments on commit 29e5689

Please sign in to comment.