bltouch: Improve handling of low pin_move_time configuration

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-09-14 15:16:26 -04:00
parent 2b3cd8db7f
commit 63311b2348
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ class BLTouchEndstopWrapper:
def home_prepare(self): def home_prepare(self):
self.test_sensor() self.test_sensor()
self.sync_print_time() self.sync_print_time()
self.send_cmd('pin_down', duration=self.pin_move_time - MIN_CMD_TIME) duration = max(MIN_CMD_TIME, self.pin_move_time - MIN_CMD_TIME)
self.send_cmd('pin_down', duration=duration)
self.send_cmd(None) self.send_cmd(None)
self.sync_print_time() self.sync_print_time()
self.mcu_endstop.home_prepare() self.mcu_endstop.home_prepare()