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