fixed CoreXZ kinematics in vibrations measurement tool
This commit is contained in:
@@ -43,7 +43,7 @@ def create_vibrations_profile(gcmd, config, st_thread: ShakeTuneThread) -> None:
|
|||||||
main_angles = [45, 135]
|
main_angles = [45, 135]
|
||||||
else:
|
else:
|
||||||
gcmd.error(
|
gcmd.error(
|
||||||
'Only Cartesian and CoreXY kinematics are supported at the moment for the vibrations measurement tool!'
|
'Only Cartesian, CoreXY and CoreXZ kinematics are supported at the moment for the vibrations measurement tool!'
|
||||||
)
|
)
|
||||||
ConsoleOutput.print(f'{motors_config_parser.kinematics.upper()} kinematics mode')
|
ConsoleOutput.print(f'{motors_config_parser.kinematics.upper()} kinematics mode')
|
||||||
|
|
||||||
|
|||||||
@@ -637,12 +637,12 @@ def vibrations_profile(
|
|||||||
global shaper_calibrate
|
global shaper_calibrate
|
||||||
shaper_calibrate = setup_klipper_import(klipperdir)
|
shaper_calibrate = setup_klipper_import(klipperdir)
|
||||||
|
|
||||||
if kinematics == 'cartesian':
|
if kinematics == 'cartesian' or kinematics == 'corexz':
|
||||||
main_angles = [0, 90]
|
main_angles = [0, 90]
|
||||||
elif kinematics == 'corexy':
|
elif kinematics == 'corexy':
|
||||||
main_angles = [45, 135]
|
main_angles = [45, 135]
|
||||||
else:
|
else:
|
||||||
raise ValueError('Only Cartesian and CoreXY kinematics are supported by this tool at the moment!')
|
raise ValueError('Only Cartesian, CoreXY and CoreXZ kinematics are supported by this tool at the moment!')
|
||||||
|
|
||||||
psds = defaultdict(lambda: defaultdict(list))
|
psds = defaultdict(lambda: defaultdict(list))
|
||||||
psds_sum = defaultdict(lambda: defaultdict(list))
|
psds_sum = defaultdict(lambda: defaultdict(list))
|
||||||
@@ -830,8 +830,8 @@ def main():
|
|||||||
opts.error('No CSV file(s) to analyse')
|
opts.error('No CSV file(s) to analyse')
|
||||||
if options.output is None:
|
if options.output is None:
|
||||||
opts.error('You must specify an output file.png to use the script (option -o)')
|
opts.error('You must specify an output file.png to use the script (option -o)')
|
||||||
if options.kinematics not in ['cartesian', 'corexy']:
|
if options.kinematics not in ['cartesian', 'corexy', 'corexz']:
|
||||||
opts.error('Only cartesian and corexy kinematics are supported by this tool at the moment!')
|
opts.error('Only cartesian, corexy and corexz kinematics are supported by this tool at the moment!')
|
||||||
|
|
||||||
fig = vibrations_profile(args, options.klipperdir, options.kinematics, options.accel, options.max_freq)
|
fig = vibrations_profile(args, options.klipperdir, options.kinematics, options.accel, options.max_freq)
|
||||||
fig.savefig(options.output, dpi=150)
|
fig.savefig(options.output, dpi=150)
|
||||||
|
|||||||
Reference in New Issue
Block a user