mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
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>
This commit is contained in:
parent
78ba7064a7
commit
3b9b4e4d6f
5 changed files with 32 additions and 47 deletions
|
@ -6,9 +6,6 @@
|
|||
import math, logging
|
||||
import homing, pins
|
||||
|
||||
ENDSTOP_OVERSAMPLE_COUNT = 4
|
||||
ENDSTOP_OVERSAMPLE_TIME = .000015
|
||||
|
||||
class PrinterStepper:
|
||||
def __init__(self, printer, config, name):
|
||||
self.name = name
|
||||
|
@ -55,8 +52,6 @@ class PrinterHomingStepper(PrinterStepper):
|
|||
|
||||
self.mcu_endstop = pins.setup_pin(
|
||||
printer, 'endstop', config.get('endstop_pin'))
|
||||
self.mcu_endstop.setup_oversample(
|
||||
ENDSTOP_OVERSAMPLE_COUNT, ENDSTOP_OVERSAMPLE_TIME)
|
||||
self.mcu_endstop.add_stepper(self.mcu_stepper)
|
||||
self.position_min = config.getfloat('position_min', 0.)
|
||||
self.position_max = config.getfloat(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue