fix corexz vibration tool error

This commit is contained in:
Félix Boisselier
2024-05-24 16:08:25 +02:00
parent ee9d9f994a
commit e680a7ee6b
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ def compute_dir_speed_spectrogram(measured_speeds, data, kinematics='cartesian',
# Compute the spectrum vibrations for each angle and speed combination # Compute the spectrum vibrations for each angle and speed combination
for target_angle_idx, (cos_val, sin_val) in enumerate(zip(cos_vals, sin_vals)): for target_angle_idx, (cos_val, sin_val) in enumerate(zip(cos_vals, sin_vals)):
for target_speed_idx, target_speed in enumerate(spectrum_speeds): for target_speed_idx, target_speed in enumerate(spectrum_speeds):
if kinematics == 'cartesian': if kinematics == 'cartesian' or kinematics == 'corexz':
speed_1 = np.abs(target_speed * cos_val) speed_1 = np.abs(target_speed * cos_val)
speed_2 = np.abs(target_speed * sin_val) speed_2 = np.abs(target_speed * sin_val)
elif kinematics == 'corexy': elif kinematics == 'corexy':

View File

@@ -45,7 +45,7 @@ class ShakeTuneThread(threading.Thread):
# This function run in a thread is used to do the CSV analysis and create the graphs # This function run in a thread is used to do the CSV analysis and create the graphs
def _shaketune_thread(self, graph_creator) -> None: def _shaketune_thread(self, graph_creator) -> None:
# Trying to reduce the Shake&Tune prost-processing thread priority to avoid slowing down the main Klipper process # Trying to reduce the Shake&Tune post-processing thread priority to avoid slowing down the main Klipper process
# as this could lead to random "Timer too close" errors when already running CANbus, etc... # as this could lead to random "Timer too close" errors when already running CANbus, etc...
try: try:
os.nice(20) os.nice(20)