changed macros names to reflect better their usage

This commit is contained in:
Félix Boisselier
2024-03-06 22:22:56 +00:00
parent 312a9c9ffa
commit 73672fd694
11 changed files with 23 additions and 23 deletions

View File

@@ -3,7 +3,7 @@
################################################
# Written by Frix_x#0161 #
[gcode_macro BELTS_SHAPER_CALIBRATION]
[gcode_macro COMPARE_BELTS_RESPONSES]
description: Perform a custom half-axis test to analyze and compare the frequency profiles of individual belts on CoreXY printers
gcode:
{% set min_freq = params.FREQ_START|default(5)|float %}

View File

@@ -3,7 +3,7 @@
################################################
# Written by Frix_x#0161 #
[gcode_macro VIBRATIONS_CALIBRATION]
[gcode_macro SPEED_VIBRATIONS_PROFILE]
gcode:
{% set size = params.SIZE|default(60)|int %} # size of the area where the movements are done
{% set direction = params.DIRECTION|default('XY') %} # can be set to either XY, AB, ABXY, A, B, X, Y, Z
@@ -124,7 +124,7 @@ gcode:
{action_respond_info("This operation can not be interrupted by normal means. Hit the \"emergency stop\" button to stop it if needed")}
{action_respond_info("")}
SAVE_GCODE_STATE NAME=STATE_VIBRATIONS_CALIBRATION
SAVE_GCODE_STATE NAME=STATE_SPEED_VIBRATIONS_PROFILE
G90
@@ -163,4 +163,4 @@ gcode:
# Restore the previous acceleration values
SET_VELOCITY_LIMIT ACCEL={old_accel} ACCEL_TO_DECEL={old_accel_to_decel} SQUARE_CORNER_VELOCITY={old_sqv}
RESTORE_GCODE_STATE NAME=STATE_VIBRATIONS_CALIBRATION
RESTORE_GCODE_STATE NAME=STATE_SPEED_VIBRATIONS_PROFILE

0
K-ShakeTune/scripts/common_func.py Normal file → Executable file
View File

View File

@@ -343,7 +343,7 @@ def sort_and_slice(raw_speeds, raw_datas, remove):
return raw_speeds, sliced_datas
def vibrations_calibration(lognames, klipperdir="~/klipper", axisname=None, accel=None, max_freq=1000., remove=0):
def speed_vibrations_profile(lognames, klipperdir="~/klipper", axisname=None, accel=None, max_freq=1000., remove=0):
set_locale()
global shaper_calibrate
shaper_calibrate = setup_klipper_import(klipperdir)
@@ -458,7 +458,7 @@ def main():
if options.remove > 50 or options.remove < 0:
opts.error("You must specify a correct percentage (option -r) in the 0-50 range")
fig = vibrations_calibration(args, options.klipperdir, options.axisname, options.accel, options.max_freq, options.remove)
fig = speed_vibrations_profile(args, options.klipperdir, options.axisname, options.accel, options.max_freq, options.remove)
fig.savefig(options.output, dpi=150)

View File

@@ -25,7 +25,7 @@ KLIPPER_FOLDER = os.path.expanduser('~/klipper')
from graph_belts import belts_calibration
from graph_shaper import shaper_calibration
from graph_vibrations import vibrations_calibration
from graph_speed_vibrations import speed_vibrations_profile
from analyze_axesmap import axesmap_calibration
RESULTS_SUBFOLDERS = ['belts', 'inputshaper', 'vibrations']
@@ -162,7 +162,7 @@ def create_vibrations_graph(axis_name, accel, chip_name, keep_csv):
time.sleep(5)
# Generate the vibration graph and its name
fig = vibrations_calibration(lognames, KLIPPER_FOLDER, axis_name, accel)
fig = speed_vibrations_profile(lognames, KLIPPER_FOLDER, axis_name, accel)
png_filename = os.path.join(RESULTS_FOLDER, RESULTS_SUBFOLDERS[2], f'vibrations_{current_date}_{axis_name}.png')
fig.savefig(png_filename, dpi=150)

0
K-ShakeTune/scripts/locale_utils.py Normal file → Executable file
View File