aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorDmitry Butyugin <dmbutyugin@google.com>2021-04-03 23:45:42 +0200
committerKevinOConnor <kevin@koconnor.net>2021-04-07 19:05:23 -0400
commit165d2fc2281798452c3f192b58fd2712e84bf1dd (patch)
tree95c65b39c4a16dba4748c8fc5fc8065ea00aea11 /klippy
parentbf01d6d1f8a95add76e5f8d93e7adf2da8658191 (diff)
downloadkutter-165d2fc2281798452c3f192b58fd2712e84bf1dd.tar.gz
kutter-165d2fc2281798452c3f192b58fd2712e84bf1dd.tar.xz
kutter-165d2fc2281798452c3f192b58fd2712e84bf1dd.zip
resonance_tester: Fixed multi-point resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/resonance_tester.py7
-rw-r--r--klippy/extras/shaper_calibrate.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/klippy/extras/resonance_tester.py b/klippy/extras/resonance_tester.py
index df557f93..55fa5583 100644
--- a/klippy/extras/resonance_tester.py
+++ b/klippy/extras/resonance_tester.py
@@ -178,7 +178,10 @@ class ResonanceTester:
"%s-axis accelerometer measured no data" % (
chip_axis,))
new_data = helper.process_accelerometer_data(chip_values)
- data = data.join(new_data) if data else new_data
+ if data is None:
+ data = new_data
+ else:
+ data.add_data(new_data)
if csv_output:
csv_name = self.save_calibration_data('resonances', name_suffix,
helper, axis, data)
@@ -251,7 +254,7 @@ class ResonanceTester:
if calibration_data[axis] is None:
calibration_data[axis] = new_data
else:
- calibration_data[axis].join(new_data)
+ calibration_data[axis].add_data(new_data)
configfile = self.printer.lookup_object('configfile')
diff --git a/klippy/extras/shaper_calibrate.py b/klippy/extras/shaper_calibrate.py
index 71e5e489..3c6065de 100644
--- a/klippy/extras/shaper_calibrate.py
+++ b/klippy/extras/shaper_calibrate.py
@@ -142,7 +142,7 @@ class CalibrationData:
self._psd_map = {'x': self.psd_x, 'y': self.psd_y, 'z': self.psd_z,
'all': self.psd_sum}
self.data_sets = 1
- def join(self, other):
+ def add_data(self, other):
np = self.numpy
joined_data_sets = self.data_sets + other.data_sets
for psd, other_psd in zip(self._psd_list, other._psd_list):