Browse Source

Fix for UBL set_bed_leveling_enabled

pull/1/head
Scott Lahteine 7 years ago
parent
commit
ad6baa5c9d
  1. 4
      Marlin/src/feature/bedlevel/bedlevel.cpp

4
Marlin/src/feature/bedlevel/bedlevel.cpp

@ -107,12 +107,12 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
const float (&pos)[XYZE] = current_position; const float (&pos)[XYZE] = current_position;
#endif #endif
if (planner.leveling_active) { if (planner.leveling_active) {
current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]);
planner.leveling_active = false; planner.leveling_active = false;
} }
else { else {
planner.leveling_active = true; planner.leveling_active = true;
current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]);
} }
#endif #endif

Loading…
Cancel
Save