From 78f4c25a14099564cf731bdaf5b97492a3a6fb47 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 29 Aug 2017 11:39:57 -0400 Subject: [PATCH] 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 --- klippy/homing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +# Copyright (C) 2016,2017 Kevin O'Connor # # 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: