diff --git a/docs/G-Codes.md b/docs/G-Codes.md index da4acfce0f8f..99b8c27b71ec 100644 --- a/docs/G-Codes.md +++ b/docs/G-Codes.md @@ -1086,7 +1086,7 @@ all enabled accelerometer chips. #### TEST_RESONANCES `TEST_RESONANCES AXIS= OUTPUT= [NAME=] [FREQ_START=] [FREQ_END=] -[HZ_PER_SEC=] [CHIPS=] +[ACCEL_PER_HZ=] [HZ_PER_SEC=] [CHIPS=] [POINT=x,y,z] [INPUT_SHAPING=[<0:1>]]`: Runs the resonance test in all configured probe points for the requested "axis" and measures the acceleration using the accelerometer chips configured for @@ -1113,8 +1113,9 @@ frequency response is calculated (across all probe points) and written into #### SHAPER_CALIBRATE `SHAPER_CALIBRATE [AXIS=] [NAME=] [FREQ_START=] -[FREQ_END=] [HZ_PER_SEC=] [CHIPS=] -[MAX_SMOOTHING=]`: Similarly to `TEST_RESONANCES`, runs +[FREQ_END=] [ACCEL_PER_HZ=] [HZ_PER_SEC=] +[CHIPS=][MAX_SMOOTHING=]`: +Similarly to `TEST_RESONANCES`, runs the resonance test as configured, and tries to find the optimal parameters for the input shaper for the requested axis (or both X and Y axes if `AXIS` parameter is unset). If `MAX_SMOOTHING` is unset, its diff --git a/klippy/extras/resonance_tester.py b/klippy/extras/resonance_tester.py index 841725e28125..e9d4e9d92c53 100644 --- a/klippy/extras/resonance_tester.py +++ b/klippy/extras/resonance_tester.py @@ -65,6 +65,8 @@ def prepare_test(self, gcmd): 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):