aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bltouch.py
Commit message (Collapse)AuthorAgeFilesLines
* toolhead: Rename _full_flush() to flush_step_generation() and use globallyKevin O'Connor2019-11-211-0/+2
| | | | | | | Update code that modifies the low-level kinematics handlers to first call toolhead.flush_step_generation(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: No need to call get/set_commanded_position()Kevin O'Connor2019-11-131-4/+0
| | | | | | | Now that the homing code does not call set_commanded_position(), it is no longer necessary to save/restore the position in the bltouch code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Remove add_to_endstop() methodKevin O'Connor2019-11-121-1/+1
| | | | | | | Now that the PrinterStepper and MCU_stepper classes have been merged, there is no need for the add_to_endstop() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Improve handling of low pin_move_time configurationKevin O'Connor2019-09-141-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Implement homing via new toolhead "drip" movementKevin O'Connor2019-07-101-3/+4
| | | | | | | | | | | Rework the low-level implementation of homing movement. The existing mechanism buffers all homing movement into the micro-controller prior to starting the home. Replace with a system that buffers all movement into the host look-ahead buffer and then "drip feed" those moves to the micro-controllers. Then clear the host look-ahead buffer when all endstops trigger. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Integrate query_endstop_wait() into query_endstop()Kevin O'Connor2019-07-101-1/+0
| | | | | | There is no need to have two separate calls to query an endstop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: No need to re-raise an EndstopErrorKevin O'Connor2019-06-061-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Update command timingKevin O'Connor2019-05-261-5/+5
| | | | | | | | | | | | | | | | | Prior to the BLTouch v3, the recommended command times were 700us (pin_down), 1200us (touch_mode), 1500us (pin_up), 1800us (self_test), and 2200us (reset). However, the recommended Marlin timing (via servo "angles") was 647.111, 1162.667, 1472, 1781.333, and 2193.778us. As of the BLTouch v3, the recommended times are now 650, 1165, 1475, 1780, and 2190us. The v3 continues to recommended Marlin timings of 647.111, 1162.667, 1472, 1781.333, and 2193.778us. Update Klipper to use the new BL-Touch v3 recommended timing. The new timings are required for the BL-Touch v3 and they are closer to what the Marlin firmware has historically used. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Change respond_info() to log by defaultKevin O'Connor2019-03-041-4/+1
| | | | | | | It makes sense to log most respond_info() content, so do that by default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Issue just a pin_up command on a normal raise probe attemptKevin O'Connor2019-02-041-1/+2
| | | | | | | | In the normal case, a regular pin_up command should be sufficient to raise the probe. (Should the regular pin_up fail, the code can issue a "reset" command during the retry.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Increase default pin_move_time from 200ms to 675msKevin O'Connor2019-02-041-1/+1
| | | | | | Use the same pin move time that Marlin uses. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Don't error on startup if the bltouch is in an error stateKevin O'Connor2019-01-311-1/+1
| | | | | | | | | Stopping the connect sequence can make it difficult to get the bltouch out of an error state. Allow the connect to proceed, ideally if the bltouch stays in an error state it will be detected during the first probe attempt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Retry reset/pin_up if the raise probe attempt failsKevin O'Connor2019-01-311-8/+20
| | | | | | | There's no harm in retrying the attempt if it appears to have failed for some reason. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Take into account clock skew when calculating command durationKevin O'Connor2019-01-211-1/+5
| | | | | | | | We want the duration of each command to be an exact multiple of SIGNAL_PERIOD. The durations might not be exact if the bltouch is on a secondary mcu. Account for this in send_cmd(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add a pin_up_touch_mode_reports_triggered config optionKevin O'Connor2019-01-211-2/+4
| | | | | | | Rework the undocumented test_sensor_pin config option into a pin_up_touch_mode_reports_triggered option and document it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Raise probe on startupKevin O'Connor2019-01-211-6/+16
| | | | | | | Send a pin_up command during startup and try to verify that the probe actually raises. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Attempt to verify that the probe raises after each probe attemptKevin O'Connor2019-01-211-13/+22
| | | | | | | | Query the bltouch state during the pin_up command to try and verify that the probe does actually retract. This may be useful to detect if the bltouch enters into an "error" state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Use pin_down mode for probingKevin O'Connor2019-01-211-3/+7
| | | | | | | | | | | | The BLTouch is more accurate when probing in "pin_down" mode than "touch_mode" (at least on some hardware). Rework the code to use that mode. When probing in pin_down mode, the BLTouch can go into an error state if a pin_up is not sent immediately after a touch signal. Rework the pin_up code to reduce the time it takes to transmit the command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Simplify time keeping of scheduled eventsKevin O'Connor2019-01-211-26/+33
| | | | | | | Introduce a sync_print_time() method and update send_cmd() to track the duration of bltouch commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Verify probe always deploys during a homing operationKevin O'Connor2019-01-211-0/+7
| | | | | | | | | Verify that there is always some movement during a probing operation. This is normally done by the homing.py code (via its verify_movement check), but that check may not be enabled when z_virtual_endstop is used. So, always enable the check in the bltouch.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Issue both a "reset" and a "pin_up" after a successful probeKevin O'Connor2018-12-161-1/+2
| | | | | | | Not all BLTouch clones raise the pin on a "reset" request, so explicitly send a "pin_up" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add a config option to disable the bltouch sensor testKevin O'Connor2018-12-161-1/+5
| | | | | | | | It appears some bltouch "clones" do not report the probe as triggered when put in "touch mode" while the pin is raised. Add a config option to allow users to disable the test. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Always make sure to check the endstop at least every 1msKevin O'Connor2018-12-161-3/+7
| | | | | | | | Some of the bltouch implementations may only respond to a probe event with a 5ms pulse. Make sure to check the signal pin at least every millisecond to ensure no signal is lost. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Fix typo in pin_move_time parsingKevin O'Connor2018-12-041-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Allow the pin_move_time to be configuredKevin O'Connor2018-12-041-9/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add a BLTOUCH_DEBUG commandKevin O'Connor2018-12-031-13/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Fix bug - must restore stepper position after homingKevin O'Connor2018-12-011-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add initial support for a bltouch "extras" moduleKevin O'Connor2018-11-301-0/+93
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>