diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 10:39:46 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 11:59:27 -0400 |
commit | 3b9b4e4d6f68216470bcb86070033a26a3562e23 (patch) | |
tree | 3c395273da145616cccecb94893e4c01e41c3074 /klippy/homing.py | |
parent | 78ba7064a73448d64a32796a2ebf3e8fd2d9beab (diff) | |
download | kutter-3b9b4e4d6f68216470bcb86070033a26a3562e23.tar.gz kutter-3b9b4e4d6f68216470bcb86070033a26a3562e23.tar.xz kutter-3b9b4e4d6f68216470bcb86070033a26a3562e23.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/homing.py')
-rw-r--r-- | klippy/homing.py | 5 |
1 files changed, 4 insertions, 1 deletions
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() |