aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/probe.py
Commit message (Collapse)AuthorAgeFilesLines
...
* probe: Wrap code to 80 columnsKevin O'Connor2019-02-271-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Set z min value in probe_accuracy to z_offset. (#1314)Rui Caridade2019-02-251-1/+1
| | | Signed-off-by: Rui Caridade <rui.mcbc@gmail.com>
* probe: Add PROBE_ACCURACY commandRui Caridade2019-02-181-1/+74
| | | | | | | | Implementation of "PROBE_ACCURACY" to measure the maximum, minimum, average and standard deviation of a probe. Signed-off-by: Rui Caridade <rui.mcbc@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Use manual_probe helper when performing manual probesKevin O'Connor2019-02-121-15/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add PROBE_CALIBRATE commandKevin O'Connor2019-02-121-7/+37
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add initial support for a bltouch "extras" moduleKevin O'Connor2018-11-301-6/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Pass printer instead of toolhead object to Homing classKevin O'Connor2018-10-161-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Implement second home from homing.pyKevin O'Connor2018-10-101-1/+3
| | | | | | | Move the logic for performing the second home from the kinematics classes to the generic homing code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Merge ProbeVirtualEndstop and ProbeEndstopWrapper wrapper classesKevin O'Connor2018-10-011-41/+27
| | | | | | No need to have two wrappers around the mcu_endstop class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Infer position_endstop when using probe:z_virtual_offsetKevin O'Connor2018-10-011-20/+7
| | | | | | | | | Don't require (or permit) the user to specify a stepper_z position_endstop when using the probe:z_virtual_offset mechanism. In that case the position_endstop should always equal the probe's z_offset - so no need to have the user specify it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Verify the toolhead moves at least some distance on a probeKevin O'Connor2018-10-011-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Support manual probing at runtimeKevin O'Connor2018-10-011-19/+19
| | | | | | | | Don't require the config file to specify manual probing. Instead, allow the user to select manual probing on each ProbePointsHelper invocation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Perform multi-sample averaging in ProbePointsHelper classKevin O'Connor2018-10-011-4/+7
| | | | | | | | Now that all the callers of ProbePointsHelper take a cartesian coordinate for the probe locations, it's possible to perform averaging of multi-sample probes within the class. This simplifies the callers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Separate out manual probing from automatic probing codeKevin O'Connor2018-10-011-39/+39
| | | | | | | | Only call cmd_NEXT() for manual probing. This simplifies the code as the automatic probing and manual probing have slightly different probing mechanisms. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move move_next() method within ProbePointsHelper classKevin O'Connor2018-10-011-12/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Implement ProbePointsHelper get_probed_position() locallyKevin O'Connor2018-10-011-5/+7
| | | | | | | | Now that all users of ProbePointsHelper use the same get_probed_position() code, it is possible to implement that locally within the ProbePointsHelper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Rename add_config_object() to register_config_callback()Kevin O'Connor2018-09-031-1/+1
| | | | | | | | | Change the name of the config registration method and pass an explicit reference to the callback to the new method. This makes the relationship between mcu registration and build_config() more clear in the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Use probe speed for initial move to the Z heightKevin O'Connor2018-08-301-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add ability to multi-sample points to ProbePointsHelperArksine2018-08-291-8/+23
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* probe: Refactor z lift code to its own function.Arksine2018-08-291-7/+11
| | | | | | Call lift-z prior to the first move. This prevents the nozzle from hitting the build surface in situations that home the nozzle off and below the bed. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* probe: Allow restarting an incomplete probe setRomain “Artefact2” Dal Maso2018-08-241-0/+3
| | | | Signed-off-by: Romain “Artefact2” Dal Maso <artefact2@gmail.com>
* bed_mesh: move probe x and y offsets to the [probe] moduleArksine2018-08-191-4/+8
| | | | | | All probe offsets are now passed to the finalize() callback in the ProbePointsHelper Class. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: update z_offset checkArksine2018-08-191-0/+5
| | | | | | Only check the probe's z_offset against the stepper_z endstop position if the probe is used as a virtual endstop. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* pins: Explicitly pass can_invert and can_pullup to lookup_pin()Kevin O'Connor2018-07-261-5/+5
| | | | | | | | | | | | Don't pass pin_type to lookup_pin() - instead, if a pin can be inverted or can have a pullup, then the caller must explicitly specify that when calling lookup_pin(). This simplifies the code for the cases where it is not valid to invert or pullup. Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin() apply default pullup and invert flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Convert get_rails() method to get_steppers()Kevin O'Connor2018-07-161-3/+2
| | | | | | | All callers of get_rails() actually just want the steppers, so return them directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Make sure there are at least 3 points even if using default_pointsKevin O'Connor2018-07-141-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Simplify mcu_probe stepper registrationKevin O'Connor2018-07-131-6/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename run_script() to run_script_from_command()Kevin O'Connor2018-06-301-3/+3
| | | | | | | Emphasize that the run_script() method is only valid when run from a g-code command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Rename get_position() callback to get_probed_position()Kevin O'Connor2018-06-221-1/+1
| | | | | | | The different uses of get_position() can be confusing, so choose a different name for the ProbePointsHelper callback. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: No need to call kin.get_position() to report positionKevin O'Connor2018-06-221-4/+3
| | | | | | | | After a probe operation, homing_move() will already have recalculated the toolhead position. The get_position() method can be slow, so use the already calculated position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Replace PrinterHomingStepper with PrinterRailKevin O'Connor2018-06-221-3/+3
| | | | | | | | Update the code to use the term "rail" when dealing with a motor controlled "axis". A rail has a series of steppers and endstops that control that motor controlled "axis". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Extras: Probing does reply with the z position where the probe triggers.Hans Raaf2018-06-131-0/+4
| | | | | | | | | | | | | This change will make the "PROBE" command actually reply with the z-position where the probe triggers. As this command is called internally for the BED_TILT_CALIBRATE and Z_TILT_ADJUST those commands will also give a response while probing, which I see as advantage over the silent operation. This change also lets one define some gcode for a repeatable probing test to meassure the quality of the sensor and overall probing accuracy. Signed-off-by: Hans Raaf <hr-klipper@oderwat.de>
* probe: Catch and propagate errors raised during ProbePointsHelperKevin O'Connor2018-06-111-5/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* z_tilt: Add support for Z_TILT_ADJUSTKevin O'Connor2018-05-221-0/+2
| | | | | | | Add new module to support independent adjustments to multiple Z steppers to account for bed tilt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Verify horizontal_move_z not less than probe's z_offsetKevin O'Connor2018-05-201-0/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move code from bed_tilt and delta_calibrate into ProbePointsHelperKevin O'Connor2018-05-201-19/+39
| | | | | | | | Move the common config reading and probe object lookup from the bed_tilt.py and delta_calibrate.py code into the ProbePointsHelper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Limit Z lift speed to be the same as the probing speedKevin O'Connor2018-04-201-3/+7
| | | | | | | When using an automatic probe, limit the Z lift speed to be no greater than the Z probing speed. This can reduce Z jerks during probing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add z_offset parameterKevin O'Connor2018-03-171-1/+7
| | | | | | | | | Move the probe_z_offset parameter from delta_calibrate and bed_tilt_calibrate to a z_offset parameter within the probe config section. It's easier to understand the z offset setting when it is in the probe config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_tilt: Take into account the XY position used with z_virtual_endstopKevin O'Connor2018-03-171-1/+28
| | | | | | | | If a z_virtual_endstop is in use, then record the last XY position that is used when the Z is homed. Use that XY position to report what change is needed to the z position_endstop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Default z_position to the configured minimum position on Z axisKevin O'Connor2018-03-171-11/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add some hints for common errors during PROBEKevin O'Connor2018-03-121-1/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mathutil: Move coordinate_descent() to new fileKevin O'Connor2018-03-041-35/+0
| | | | | | | Add a new python file (mathutil.py) and move the coordinate_descent() code to it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Increase calibration log level from debug to infoKevin O'Connor2018-02-161-1/+1
| | | | | | | Output more information by default from the bed_tilt and delta_calibrate commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Introduce load_config_prefix() for modules that take parametersKevin O'Connor2018-02-031-2/+0
| | | | | | | | Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Create a probe:z_virtual_endstop pinKevin O'Connor2018-01-281-1/+12
| | | | | | | Create a virtual pin that may be used as the z endstop pin on cartesian printers that use the probe in place of a z endstop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Support activate/deactivate scripts on each probeKevin O'Connor2018-01-281-0/+26
| | | | | | | | Allow a set of g-code scripts to be run on each probe invocation. This may be useful for probes that need to be setup before they are useful (eg, with servo actuated probes). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta_calibrate: Add initial support for a DELTA_CALIBRATE commandKevin O'Connor2018-01-281-0/+86
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Initial support for Z-Probe hardwareKevin O'Connor2018-01-281-0/+54
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>