aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/resonance_tester.py
diff options
context:
space:
mode:
authorMRX8024 <57844100+MRX8024@users.noreply.github.com>2024-11-13 02:55:32 +0200
committerGitHub <noreply@github.com>2024-11-12 19:55:32 -0500
commit6d1256ddcc51cc62ab403fdc29d0b2688116a29e (patch)
treec7720c5ac142fac0d6306cfc38f8bab7869024a9 /klippy/extras/resonance_tester.py
parent2af8d3f1d0d836126cc3447b6530a0107dabf772 (diff)
downloadkutter-6d1256ddcc51cc62ab403fdc29d0b2688116a29e.tar.gz
kutter-6d1256ddcc51cc62ab403fdc29d0b2688116a29e.tar.xz
kutter-6d1256ddcc51cc62ab403fdc29d0b2688116a29e.zip
resonance_tester: Fix chips selection, add accel_per_hz selection (#6726)
Corrected issue where accelerometer names were incorrectly prefixed with "adxl345", preventing the selection of other chip types when running TEST_RESONANCES. Implemented support for selecting the `accel_per_hz` parameter when running TEST_RESONANCES. docs: Update TEST_RESONANCES + SHAPER_CALIBRATE with missing parameters and bracket corrections Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
Diffstat (limited to 'klippy/extras/resonance_tester.py')
-rw-r--r--klippy/extras/resonance_tester.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/klippy/extras/resonance_tester.py b/klippy/extras/resonance_tester.py
index fe8717d5..e9d4e9d9 100644
--- a/klippy/extras/resonance_tester.py
+++ b/klippy/extras/resonance_tester.py
@@ -65,6 +65,8 @@ class VibrationPulseTest:
self.freq_start = gcmd.get_float("FREQ_START", self.min_freq, minval=1.)
self.freq_end = gcmd.get_float("FREQ_END", self.max_freq,
minval=self.freq_start, maxval=300.)
+ self.accel_per_hz = gcmd.get_float("ACCEL_PER_HZ",
+ self.accel_per_hz, above=0.)
self.hz_per_sec = gcmd.get_float("HZ_PER_SEC", self.hz_per_sec,
above=0., maxval=2.)
def run_test(self, axis, gcmd):
@@ -212,11 +214,7 @@ class ResonanceTester:
def _parse_chips(self, accel_chips):
parsed_chips = []
for chip_name in accel_chips.split(','):
- if "adxl345" in chip_name:
- chip_lookup_name = chip_name.strip()
- else:
- chip_lookup_name = "adxl345 " + chip_name.strip();
- chip = self.printer.lookup_object(chip_lookup_name)
+ chip = self.printer.lookup_object(chip_name.strip())
parsed_chips.append(chip)
return parsed_chips
def _get_max_calibration_freq(self):