Skip to content

Commit

Permalink
Added additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhubott committed Jan 27, 2016
1 parent 865f2bd commit aafd857
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2580,13 +2580,19 @@ inline void gcode_G28() {
#if ENABLED(G28_AUTOSET_Z_HOME_OFFSET)
if (setZhomeOffset)
{
if (marlin_debug_flags & DEBUG_LEVELING) {
SERIAL_ECHOPAIR("Z Probe Started at: ", (float)st_get_position_mm(Z_AXIS));
}

float measured_z = probe_pt(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, Z_RAISE_BEFORE_PROBING, ProbeStay, 1);

//Set Z offset
home_offset[Z_AXIS] = 0 - measured_z - zprobe_zoffset;
home_offset[Z_AXIS] = ((float)0.0) - measured_z - zprobe_zoffset;

if (marlin_debug_flags & DEBUG_LEVELING) {
SERIAL_ECHOPAIR("Z Home offset set to ", (float)home_offset[Z_AXIS]);
SERIAL_ECHOPAIR("Z Position Ended at: ", (float)measured_z);
SERIAL_EOL;
SERIAL_ECHOPAIR("Z Home offset set to: ", (float)home_offset[Z_AXIS]);
SERIAL_EOL;
}
}
Expand Down

0 comments on commit aafd857

Please sign in to comment.