Commit Graph

21 Commits

Author SHA1 Message Date
Arksine 7694c3e1b8 bed_mesh: fix get_position()
Fix a bug where the fade factor is calculated incorrectly when get_position() is called.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-25 13:34:14 -05:00
Arksine f308171be4 bed_mesh: refactor fade_target
Offset the entire mesh by the fade target amount rather than offset each z lookup.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-25 13:34:14 -05:00
Arksine cdcc320710 bed_mesh: add support for round beds
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-02-02 23:29:00 -05:00
Arksine 542f941f07 bed_mesh: log when fade completes.
- Also simplify the math for the mesh x and y multipliers.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2019-02-02 23:29:00 -05:00
Kevin O'Connor 857e7ed5f1 klippy: Convert printer_state("connect") to an event handler
Convert all users of the printer_state("connect") handler to register
a "klippy:connect" event handler instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-08 11:09:55 -05:00
Arksine cf6a56cebf bed_mesh: Introduce fade_target option
To deal potential z scaling when fade is enabled, a fade_target option has been introduced.  This option may either be set to 0.0 or any z position within the range of the mesh.  A value of 0.0 will result in previous behavior, where z adjustment phases out until no further adjustment is added.  A non-zero value will phase out adjustment until the target has been reached, after which the rest of the print will be offset along the z axis by the fade_target.  By default the fade_target will be calculated as an average of the mesh.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-11-30 11:37:21 -05:00
Arksine 35f41b7402 bed_mesh: Disable z-adjustment fade by default.
Due to various potential issues with fading out z-adjustment, it is better to disable by default and allow users to opt-in.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-11-30 11:37:21 -05:00
Lucas Fink f6c2e8b4eb bed_mesh: Fix some fragile identity comparisons
Signed-off-by: Lucas Fink <software@lfcode.ca>
2018-10-31 16:02:45 -04:00
Kevin O'Connor e4bb90a1ca bed_mesh: Do not automatically run G28 on BED_MESH_CALIBRATE / BED_MESH_MAP
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-22 11:26:01 -04:00
Arksine d29eb731a9 bed_mesh: save mesh state to 'default' profile after calibration
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-10-04 12:53:03 -04:00
Arksine b261d31ec5 bed_mesh: Add ability to save mesh state to persistent memory
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-10-02 16:26:35 -04:00
Arksine 144868c600 bed_mesh: Extend BED_MESH_MAP to provide more information
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-10-02 16:26:35 -04:00
Kevin O'Connor c5d4e14298 probe: Infer position_endstop when using probe:z_virtual_offset
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>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 33887b8c39 probe: Support manual probing at runtime
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>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 0e9b8abde2 probe: Perform multi-sample averaging in ProbePointsHelper class
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>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 8e7eac9b08 probe: Implement ProbePointsHelper get_probed_position() locally
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>
2018-10-01 11:12:30 -04:00
Arksine d6f72eefa1 bed_mesh: Cache last position when get_position() is called.
Fixes issue #626.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-09-10 15:10:43 -04:00
Arksine 40b7ba5111 probe: Add ability to multi-sample points to ProbePointsHelper
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2018-08-29 12:01:19 -04:00
Arksine 3387cccdcf bed_mesh: move probe x and y offsets to the [probe] module
All probe offsets are now passed to the finalize() callback in the ProbePointsHelper Class.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-08-19 16:52:23 -04:00
Arksine 52df40dfbb bed_mesh: update z_offset check
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>
2018-08-19 16:52:23 -04:00
Arksine e0bd221c57 bed_mesh: mesh bed leveling for Klipper
Initial implementation of configurable Mesh Bed Leveling.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-08-17 09:22:55 -04:00