Browse Source

Fix Z after ABL Bilinear G29 with fade

Co-Authored-By: Alan T <interstellarmisfit@users.noreply.github.com>
vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
c39873759f
  1. 7
      Marlin/src/gcode/bedlevel/abl/G29.cpp

7
Marlin/src/gcode/bedlevel/abl/G29.cpp

@ -934,7 +934,12 @@ G29_TYPE GcodeSuite::G29() {
// Unapply the offset because it is going to be immediately applied // Unapply the offset because it is going to be immediately applied
// and cause compensation movement in Z // and cause compensation movement in Z
current_position.z -= bilinear_z_offset(current_position); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = planner.fade_scaling_factor_for_z(current_position.z);
#else
constexpr float fade_scaling_factor = 1.0f;
#endif
current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z);
} }

Loading…
Cancel
Save