I added 2 new commands to improve Z_TILT accuracy. The goal is to reach the optimal bed position on the first run, without the need of retries.
There are 2 problems with z_tilt:
- Often the exact positions of steppers/pivot points are not known. The branch adds a command Z_TILT_AUTODETECT to determine those positions. It is currently only implemented for 3 z-motors.
- If the bed is not 100% level, probing only 3 points can lead to a (reproducibly) non-level bed. To address this, klipper allows to probe in more than 3 points and does a least-squares approximation to find the optimal positions. The downside is that this elongates the probing process. To address this, the branch adds the command Z_TILT_CALIBRATE. This probes a full set of points and determines the z-offsets of the main set of probes. When Z_TILT_ADJUST later probes the main probes, it uses the saved offsets to restore the positions reached with the full set of probes, thus speeding up the process significantly. I also only tested it with 3 motors, but it can potentially be useful also in other setups.
It works well for me, but getting some more testes would be great. You can find it here:
Feedback would be greatly appreciated.