diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-29 11:39:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-29 18:02:36 -0400 |
commit | 78f4c25a14099564cf731bdaf5b97492a3a6fb47 (patch) | |
tree | 4593547502b1797027bf9911c8a0118f98975337 | |
parent | 002dc0dfaf42feae0e7955c035ef0bbd19cf0a19 (diff) | |
download | kutter-78f4c25a14099564cf731bdaf5b97492a3a6fb47.tar.gz kutter-78f4c25a14099564cf731bdaf5b97492a3a6fb47.tar.xz kutter-78f4c25a14099564cf731bdaf5b97492a3a6fb47.zip |
homing: Add a small delay before each homing operation
The homing operation can be cpu intensive for the host software. Add
a small (250ms) delay before homing so that the host has additional
time to process the command before it is due on the mcu. This is
intended to work around some reports of "timer too close" errors
during Z homing on RPi2 hosts and printers with high precision Z
positioning.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/homing.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/klippy/homing.py b/klippy/homing.py index 7ec103b0..c939c978 100644 --- a/klippy/homing.py +++ b/klippy/homing.py @@ -1,10 +1,12 @@ # Code for state tracking during homing operations # -# Copyright (C) 2016 Kevin O'Connor <kevin@koconnor.net> +# Copyright (C) 2016,2017 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import logging +HOMING_DELAY = 0.250 + class Homing: def __init__(self, toolhead, changed_axes): self.toolhead = toolhead @@ -29,6 +31,8 @@ class Homing: # Alter kinematics class to think printer is at forcepos self.toolhead.set_position(self._fill_coord(forcepos)) # Start homing and issue move + if not second_home: + self.toolhead.dwell(HOMING_DELAY) print_time = self.toolhead.get_last_move_time() endstops = [] for s in steppers: |