From d136b1e41a1e2a5dc7b5c3e5c6a329424b3020aa Mon Sep 17 00:00:00 2001 From: Dmitry Butyugin Date: Fri, 29 Jan 2021 20:55:31 +0100 Subject: [PATCH] resonance_tester: Increase test max_accel to 10K and max_freq to 133 Hz Signed-off-by: Dmitry Butyugin --- docs/Measuring_Resonances.md | 4 ++-- klippy/extras/resonance_tester.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/Measuring_Resonances.md b/docs/Measuring_Resonances.md index ec1cbbfe..c311476d 100644 --- a/docs/Measuring_Resonances.md +++ b/docs/Measuring_Resonances.md @@ -126,8 +126,8 @@ Now you can run some real-life tests. In `printer.cfg` add or replace the following values: ``` [printer] -max_accel: 7000 -max_accel_to_decel: 7000 +max_accel: 10000 +max_accel_to_decel: 10000 ``` (after you are done with the measurements, revert these values to their old, or the newly suggested values). diff --git a/klippy/extras/resonance_tester.py b/klippy/extras/resonance_tester.py index f4b0fa76..df557f93 100644 --- a/klippy/extras/resonance_tester.py +++ b/klippy/extras/resonance_tester.py @@ -20,9 +20,10 @@ class VibrationPulseTest: printer = config.get_printer() self.gcode = printer.lookup_object('gcode') self.min_freq = config.getfloat('min_freq', 5., minval=1.) - self.max_freq = config.getfloat('max_freq', 120., + # Defaults are such that max_freq * accel_per_hz == 10000 (max_accel) + self.max_freq = config.getfloat('max_freq', 10000. / 75., minval=self.min_freq, maxval=200.) - self.accel_per_hz = config.getfloat('accel_per_hz', 75.0, above=0.) + self.accel_per_hz = config.getfloat('accel_per_hz', 75., above=0.) self.hz_per_sec = config.getfloat('hz_per_sec', 1., minval=0.1, maxval=2.)