allow better script behavior customization from the macros
This commit is contained in:
@@ -16,6 +16,9 @@ gcode:
|
||||
{% set accel = params.ACCEL|default(3000)|int %} # accel value used to move on the pattern
|
||||
{% set accel_chip = params.ACCEL_CHIP|default("adxl345") %} # ADXL chip name in the config
|
||||
|
||||
{% set keep_results = params.KEEP_N_RESULTS|default(3)|int %}
|
||||
{% set keep_csv = params.KEEP_CSV|default(True) %}
|
||||
|
||||
{% set mid_x = printer.toolhead.axis_maximum.x|float / 2 %}
|
||||
{% set mid_y = printer.toolhead.axis_maximum.y|float / 2 %}
|
||||
{% set nb_samples = ((max_speed - min_speed) / speed_increment + 1) | int %}
|
||||
@@ -153,7 +156,9 @@ gcode:
|
||||
|
||||
RESPOND MSG="Machine and motors vibration graph generation..."
|
||||
RESPOND MSG="This may take some time (3-5min)"
|
||||
RUN_SHELL_COMMAND CMD=shaketune PARAMS="VIBRATIONS {direction} {accel}"
|
||||
RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type vibrations --axis_name {direction} --accel {accel} {% if keep_csv %}--keep_csv{% endif %}"
|
||||
M400
|
||||
RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type clean --keep_results {keep_results}"
|
||||
|
||||
# Restore the previous acceleration values
|
||||
SET_VELOCITY_LIMIT ACCEL={old_accel} ACCEL_TO_DECEL={old_accel_to_decel} SQUARE_CORNER_VELOCITY={old_sqv}
|
||||
|
||||
Reference in New Issue
Block a user