Skip to content

Commit

Permalink
Make MOVE argument configurable (#92)
Browse files Browse the repository at this point in the history
* feat: make the MOVE argument configurable

Fixes #89

* feat: renamed MOVE to FUZZY_TOUCH and renamed scanner_touch_move to scanner_touch_fuzzy_move

* fix: set a maxval on fuzzy_touch config

---------

Co-authored-by: Chris Krause <[email protected]>
  • Loading branch information
Jomik and krautech authored Nov 22, 2024
1 parent 96c5bc8 commit 497d030
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def __init__(self, config):
"z_offset": config.getfloat("scanner_touch_z_offset", 0.05),
"threshold": config.getint("scanner_touch_threshold", 2500),
"max_temp": config.getfloat("scanner_touch_max_temp", 150),
"fuzzy_touch": config.getfloat("scanner_touch_fuzzy_touch", 0, maxval=10),
}
self.gcode = self.printer.lookup_object("gcode")
self.probe_calibrate_z = 0.0
Expand Down Expand Up @@ -424,7 +425,9 @@ def _get_common_variables(self, gcmd):
"touch_location_y": gcmd.get_float(
"TOUCH_LOCATION_Y", float(self.touch_location[1])
),
"randomize": gcmd.get_float("MOVE", 0, maxval=10),
"randomize": gcmd.get_float(
"FUZZZY_TOUCH", self.scanner_touch_config["fuzzy_touch"], maxval=10
),
"verbose": gcmd.get_int("DEBUG", 0),
}

Expand Down

0 comments on commit 497d030

Please sign in to comment.