Skip to content

Commit

Permalink
pass params from calibrate to touch
Browse files Browse the repository at this point in the history
  • Loading branch information
krautech authored and Jomik committed Nov 28, 2024
1 parent d2d5739 commit 996e9a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,17 @@ def __init__(self, config: ConfigWrapper):
cmd_SCANNER_CALIBRATE_help = "Calibrate scanner response curve"

def cmd_SCANNER_CALIBRATE(self, gcmd: GCodeCommand):
orig_params = gcmd.get_command_parameters()
if self.calibration_method != "scan":
cmd = self.sensor_name + "_TOUCH"
params = {}
if gcmd.get("METHOD", "None").lower() == "manual":
params["METHOD"] = "manual"
else:
params["CALIBRATE"] = "1"

params.update(orig_params)

cmd = self.gcode.create_gcode_command(cmd, cmd, params)
self.cmd_SCANNER_TOUCH(cmd)
else:
Expand Down

0 comments on commit 996e9a6

Please sign in to comment.