Add a proper flag for ABL enabled
This commit is contained in:
@@ -98,6 +98,10 @@ float Planner::min_feedrate_mm_s,
|
||||
Planner::max_e_jerk,
|
||||
Planner::min_travel_feedrate_mm_s;
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
||||
bool Planner::abl_enabled = false; // Flag that auto bed leveling is enabled
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR)
|
||||
matrix_3x3 Planner::bed_level_matrix; // Transform to compensate for bed level
|
||||
#endif
|
||||
@@ -524,6 +528,11 @@ void Planner::check_axes_activity() {
|
||||
#if PLANNER_LEVELING
|
||||
|
||||
void Planner::apply_leveling(float &lx, float &ly, float &lz) {
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
||||
if (!abl_enabled) return;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
if (mbl.active())
|
||||
@@ -562,6 +571,11 @@ void Planner::check_axes_activity() {
|
||||
}
|
||||
|
||||
void Planner::unapply_leveling(float &lx, float &ly, float &lz) {
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
||||
if (!abl_enabled) return;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
if (mbl.active())
|
||||
@@ -627,8 +641,7 @@ void Planner::buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, float fr_mm_s, co
|
||||
dz = target[Z_AXIS] - position[Z_AXIS];
|
||||
|
||||
/*
|
||||
SERIAL_ECHOPGM(" Planner ");
|
||||
SERIAL_ECHOPAIR("FR:", fr_mm_s);
|
||||
SERIAL_ECHOPAIR(" Planner FR:", fr_mm_s);
|
||||
SERIAL_CHAR(' ');
|
||||
#if IS_KINEMATIC
|
||||
SERIAL_ECHOPAIR("A:", lx);
|
||||
|
Reference in New Issue
Block a user