diff --git a/shaketune/measurement/motorsconfigparser.py b/shaketune/measurement/motorsconfigparser.py index 038c508..0275438 100644 --- a/shaketune/measurement/motorsconfigparser.py +++ b/shaketune/measurement/motorsconfigparser.py @@ -146,6 +146,7 @@ class MotorsConfigParser: motor.set_config('autotune_enabled', True) motor.set_config('motor', autotune_object.motor) motor.set_config('voltage', autotune_object.voltage) + motor.set_config('pwm_freq_target', autotune_object.pwm_freq_target) else: motor.set_config('autotune_enabled', False) diff --git a/shaketune/post_processing/graph_vibrations.py b/shaketune/post_processing/graph_vibrations.py index 55009de..712a727 100644 --- a/shaketune/post_processing/graph_vibrations.py +++ b/shaketune/post_processing/graph_vibrations.py @@ -570,7 +570,9 @@ def plot_motor_config_txt(fig, motors, differences): f"| {lbl}: {mot.get_config('motor').upper()} on {mot.get_config('tmc').upper()} @ {mot.get_config('voltage'):0.1f}V {mot.get_config('run_current'):0.2f}A - {mot.get_config('microsteps')}usteps" for mot, lbl in motor_details ] - config_blocks.append('| TMC Autotune enabled') + config_blocks.append( + f'| TMC Autotune enabled (PWM freq target: X={motors[0].get_config('pwm_freq_target')}kHz / Y={motors[1].get_config("pwm_freq_target")}kHz)' + ) else: config_blocks = [ f"| {lbl}: {mot.get_config('tmc').upper()} @ {mot.get_config('run_current'):0.2f}A - {mot.get_config('microsteps')}usteps"