From 3b9b4e4d6f68216470bcb86070033a26a3562e23 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 12 Oct 2017 10:39:46 -0400 Subject: 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 --- docs/MCU_Commands.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/MCU_Commands.md b/docs/MCU_Commands.md index c2f1e306..51505545 100644 --- a/docs/MCU_Commands.md +++ b/docs/MCU_Commands.md @@ -255,13 +255,15 @@ Stepper commands number of steps generated with dir=1 minus the total number of steps generated with dir=0. -* `end_stop_home oid=%c clock=%u rest_ticks=%u pin_value=%c` : This - command is used during stepper "homing" operations. To use this - command a 'config_end_stop' command with the same 'oid' parameter - must have been issued during micro-controller configuration. When - this command is invoked, the micro-controller will sample the - endstop pin every 'rest_ticks' clock ticks and check if it has a - value equal to 'pin_value'. If the value matches then the movement +* `end_stop_home oid=%c clock=%u sample_ticks=%u sample_count=%c + rest_ticks=%u pin_value=%c` : This command is used during stepper + "homing" operations. To use this command a 'config_end_stop' command + with the same 'oid' parameter must have been issued during + micro-controller configuration. When this command is invoked, the + micro-controller will sample the endstop pin every 'rest_ticks' + clock ticks and check if it has a value equal to 'pin_value'. If the + value matches (and it continues to match for 'sample_count' + additional samples spread 'sample_ticks' apart) then the movement queue for the associated stepper will be cleared and the stepper will come to an immediate halt. The host uses this command to implement homing - the host instructs the endstop to sample for the -- cgit v1.2.3-70-g09d2