added PWM freq targets to vibration graphs

This commit is contained in:
Félix Boisselier
2024-06-04 18:45:21 +02:00
parent bb6907e5e6
commit f9e5d64eac
2 changed files with 4 additions and 1 deletions

View File

@@ -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)

View File

@@ -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"