Skip to content

Commit

Permalink
Rename g29_speed to probe_speed
Browse files Browse the repository at this point in the history
This is the speed the toolhead moves down at when probing the sensor
  • Loading branch information
0xD34D committed Dec 13, 2023
1 parent 7fafb8e commit f546d38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions klippy/extras/prtouch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, config):
self.max_z = config.getsection('stepper_z').getfloat('position_max', default=300, minval=100, maxval=500)
self.g29_xy_speed = config.getfloat('g29_xy_speed', default=150, minval=10, maxval=1000)
self.g29_rdy_speed = config.getfloat('g29_rdy_speed', default=2.5, minval=0.1, maxval=10)
self.g29_speed = config.getfloat('g29_speed', default=2.0, minval=0.1, maxval=10)
self.probe_speed = config.getfloat('probe_speed', default=2.0, minval=0.1, maxval=10)
self.show_msg = config.getboolean('show_msg', default=False)
self.check_bed_mesh_max_err = config.getfloat('check_bed_mesh_max_err', default=0.2, minval=0.01, maxval=1)
self.wipe_retract_distance = config.getfloat('wipe_retract_distance', default=0, minval=0, maxval=50)
Expand Down Expand Up @@ -254,9 +254,9 @@ def clear_nozzle(self, hot_min_temp, hot_max_temp, bed_max_temp, min_hold, max_h
src_pos = [min_x, min_y, self.cfg.bed_max_err + 1, cur_pos[3]]
end_pos = [max_x, max_y, src_pos[2], src_pos[3]]
self._set_hot_temps(temp=hot_min_temp, fan_spd=0, wait=True, err=10)
src_pos[2] = self._probe_times(3, [src_pos[0], src_pos[1], src_pos[2]], self.cfg.g29_speed, 10, 0.2, min_hold, max_hold)
src_pos[2] = self._probe_times(3, [src_pos[0], src_pos[1], src_pos[2]], self.cfg.probe_speed, 10, 0.2, min_hold, max_hold)
self._set_hot_temps(temp=hot_min_temp + 40, fan_spd=0, wait=False, err=10)
end_pos[2] = self._probe_times(3, [end_pos[0], end_pos[1], end_pos[2]], self.cfg.g29_speed, 10, 0.2, min_hold, max_hold)
end_pos[2] = self._probe_times(3, [end_pos[0], end_pos[1], end_pos[2]], self.cfg.probe_speed, 10, 0.2, min_hold, max_hold)
self._move(src_pos[:2] + [self.cfg.bed_max_err + 1], self.cfg.g29_xy_speed)
self._move(src_pos[:2] + [src_pos[2] + 0.1], self.cfg.g29_rdy_speed)
self._set_hot_temps(temp=hot_max_temp, fan_spd=0, wait=True, err=10)
Expand All @@ -266,9 +266,9 @@ def clear_nozzle(self, hot_min_temp, hot_max_temp, bed_max_temp, min_hold, max_h
self.obj.gcode.run_script_from_command('G91')
self.obj.gcode.run_script_from_command('G1 E-%.2f F600' % self.cfg.wipe_retract_distance)
self.obj.gcode.run_script_from_command('G90')
self._move(end_pos[:2] + [end_pos[2] + self.cfg.pa_clr_down_mm], self.cfg.g29_speed)
self._move(end_pos[:2] + [end_pos[2] + self.cfg.pa_clr_down_mm], self.cfg.probe_speed)
self._set_hot_temps(temp=hot_min_temp, fan_spd=255, wait=True, err=5)
self._move([end_pos[0], end_pos[1] + 10, end_pos[2] + 10], self.cfg.g29_speed)
self._move([end_pos[0], end_pos[1] + 10, end_pos[2] + 10], self.cfg.probe_speed)
self._set_hot_temps(temp=hot_min_temp, fan_spd=0, wait=False)
self._set_bed_temps(temp=bed_max_temp, wait=True, err=5)

Expand All @@ -278,7 +278,7 @@ def clear_nozzle(self, hot_min_temp, hot_max_temp, bed_max_temp, min_hold, max_h

def probe_z_offset(self, x, y):
self._ck_g28ed()
z_offset = self._probe_times(3, [x, y, self.cfg.bed_max_err + 1.], self.cfg.g29_speed, 10, self.cfg.check_bed_mesh_max_err, self.cfg.min_hold, self.cfg.max_hold)
z_offset = self._probe_times(3, [x, y, self.cfg.bed_max_err + 1.], self.cfg.probe_speed, 10, self.cfg.check_bed_mesh_max_err, self.cfg.min_hold, self.cfg.max_hold)
return z_offset

def _cal_min_z(self, start_z, hx711_vals):
Expand Down

0 comments on commit f546d38

Please sign in to comment.