probe: Move move_next() method within ProbePointsHelper class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8e7eac9b08
commit
cb3fede19a
|
@ -199,6 +199,18 @@ class ProbePointsHelper:
|
|||
except homing.EndstopError as e:
|
||||
self.finalize(False)
|
||||
raise self.gcode.error(str(e))
|
||||
def move_next(self):
|
||||
x, y = self.probe_points[len(self.results)/self.samples]
|
||||
curpos = self.toolhead.get_position()
|
||||
curpos[0] = x
|
||||
curpos[1] = y
|
||||
curpos[2] = self.horizontal_move_z
|
||||
try:
|
||||
self.toolhead.move(curpos, self.speed)
|
||||
except homing.EndstopError as e:
|
||||
self.finalize(False)
|
||||
raise self.gcode.error(str(e))
|
||||
self.gcode.reset_last_position()
|
||||
def probe_point(self):
|
||||
for i in range(self.samples):
|
||||
self.gcode.run_script_from_command("PROBE")
|
||||
|
@ -228,18 +240,6 @@ class ProbePointsHelper:
|
|||
except:
|
||||
self.finalize(False)
|
||||
raise
|
||||
def move_next(self):
|
||||
x, y = self.probe_points[len(self.results)/self.samples]
|
||||
curpos = self.toolhead.get_position()
|
||||
curpos[0] = x
|
||||
curpos[1] = y
|
||||
curpos[2] = self.horizontal_move_z
|
||||
try:
|
||||
self.toolhead.move(curpos, self.speed)
|
||||
except homing.EndstopError as e:
|
||||
self.finalize(False)
|
||||
raise self.gcode.error(str(e))
|
||||
self.gcode.reset_last_position()
|
||||
cmd_NEXT_help = "Move to the next XY position to probe"
|
||||
def cmd_NEXT(self, params):
|
||||
if self.probe is None:
|
||||
|
|
Loading…
Reference in New Issue