From 3b9b4e4d6f68216470bcb86070033a26a3562e23 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 12 Oct 2017 10:39:46 -0400 Subject: endstop: Eliminate end_stop_set_oversample command Pass the sample_ticks and sample_count parameters directly in the end_stop_home command instead. This simplifies the code. Also, simplify calculation of next wakeup time in end_stop_oversample_event(). Signed-off-by: Kevin O'Connor --- klippy/homing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'klippy/homing.py') diff --git a/klippy/homing.py b/klippy/homing.py index 21d3e225..c4092fff 100644 --- a/klippy/homing.py +++ b/klippy/homing.py @@ -6,6 +6,8 @@ import logging HOMING_DELAY = 0.250 +ENDSTOP_SAMPLE_TIME = .000015 +ENDSTOP_SAMPLE_COUNT = 4 class Homing: def __init__(self, toolhead, changed_axes): @@ -36,7 +38,8 @@ class Homing: print_time = self.toolhead.get_last_move_time() endstops = [] for s in steppers: - s.mcu_endstop.home_start(print_time, s.step_dist / speed) + s.mcu_endstop.home_start(print_time, ENDSTOP_SAMPLE_TIME, + ENDSTOP_SAMPLE_COUNT, s.step_dist / speed) endstops.append((s, s.mcu_stepper.get_mcu_position())) self.toolhead.move(self._fill_coord(movepos), speed) move_end_print_time = self.toolhead.get_last_move_time() -- cgit v1.2.3-70-g09d2