mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
resonance_tester: Apply input shaper params on SHAPER_CALIBRATE
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
parent
16c53992d6
commit
624d360a34
4 changed files with 23 additions and 1 deletions
|
@ -334,6 +334,18 @@ class ShaperCalibrate:
|
|||
configfile.set('input_shaper', 'shaper_freq_'+axis,
|
||||
'%.1f' % (shaper_freq,))
|
||||
|
||||
def apply_params(self, input_shaper, axis, shaper_name, shaper_freq):
|
||||
if axis == 'xy':
|
||||
self.apply_params(input_shaper, 'x', shaper_name, shaper_freq)
|
||||
self.apply_params(input_shaper, 'y', shaper_name, shaper_freq)
|
||||
return
|
||||
gcode = self.printer.lookup_object("gcode")
|
||||
axis = axis.upper()
|
||||
input_shaper.cmd_SET_INPUT_SHAPER(gcode.create_gcode_command(
|
||||
"SET_INPUT_SHAPER", "SET_INPUT_SHAPER", {
|
||||
"SHAPER_TYPE_" + axis: shaper_name,
|
||||
"SHAPER_FREQ_" + axis: shaper_freq}))
|
||||
|
||||
def save_calibration_data(self, output, calibration_data, shapers=None):
|
||||
try:
|
||||
with open(output, "w") as csvfile:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue