Skip to content

Commit

Permalink
🩹 Fix Mesh Leveling + Debug compile (MarlinFirmware#24297)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombrazier authored and LCh-77 committed Jun 15, 2022
1 parent 48ceed4 commit a4cc449
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Marlin/src/core/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ void safe_delay(millis_t ms) {
#else
#if ENABLED(AUTO_BED_LEVELING_UBL)
SERIAL_ECHOPGM("UBL Adjustment Z");
const float rz = bedlevel.get_z_correction(current_position);
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
SERIAL_ECHOPGM("ABL Adjustment Z");
const float rz = bedlevel.get_z_correction(current_position);
#endif
const float rz = bedlevel.get_z_correction(current_position);
SERIAL_ECHO(ftostr43sign(rz, '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) {
Expand All @@ -156,11 +155,13 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOPGM("Mesh Bed Leveling");
if (planner.leveling_active) {
SERIAL_ECHOLNPGM(" (enabled)");
SERIAL_ECHOPGM("MBL Adjustment Z", ftostr43sign(bedlevel.get_z(current_position), '+'));
const float z_offset = bedlevel.get_z_offset(),
z_correction = bedlevel.get_z_correction(current_position);
SERIAL_ECHOPGM("MBL Adjustment Z", ftostr43sign(z_offset + z_correction, '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) {
SERIAL_ECHOPGM(" (", ftostr43sign(
bedlevel.get_z(current_position, planner.fade_scaling_factor_for_z(current_position.z)), '+'
z_offset + z_correction * planner.fade_scaling_factor_for_z(current_position.z), '+'
));
SERIAL_CHAR(')');
}
Expand Down

0 comments on commit a4cc449

Please sign in to comment.