Move NONLINEAR bed leveling to planner

This is in advance of moving non-linear bed leveling to the planner
class.
This commit is contained in:
Scott Lahteine
2016-09-15 00:20:30 -05:00
parent 9429c7db89
commit 77639672d7
5 changed files with 71 additions and 65 deletions

View File

@@ -541,6 +541,23 @@ void Planner::check_axes_activity() {
ly = LOGICAL_Y_POSITION(dy + Y_TILT_FULCRUM);
lz = LOGICAL_Z_POSITION(dz);
#elif ENABLED(AUTO_BED_LEVELING_NONLINEAR)
float tmp[XYZ] = { lx, ly, 0 };
#if ENABLED(DELTA)
float offset = nonlinear_z_offset(tmp);
lx += offset;
ly += offset;
lz += offset;
#else
lz += nonlinear_z_offset(tmp);
#endif
#endif
}
@@ -562,6 +579,11 @@ void Planner::check_axes_activity() {
ly = LOGICAL_Y_POSITION(dy + Y_TILT_FULCRUM);
lz = LOGICAL_Z_POSITION(dz);
#elif ENABLED(AUTO_BED_LEVELING_NONLINEAR)
float tmp[XYZ] = { lx, ly, 0 };
lz -= nonlinear_z_offset(tmp);
#endif
}