Skip to content

Commit

Permalink
G29 Z-0.02 now allows interactive adjustment of Z_PROBE_OFFSET.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrocholl committed Jun 6, 2013
1 parent 29e724e commit b0a379a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {200*60, 200*60, 200*60, 0} // set the homing speeds (mm/min)

#define Z_PROBE_OFFSET {0, 13.6, 6.6, 0} // Distance between hotend nozzle and deployed bed leveling probe.
#define Z_PROBE_OFFSET {0, -13.6, -6.47, 0} // Distance between hotend nozzle and deployed bed leveling probe.

// default settings

Expand Down
13 changes: 7 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,14 +719,14 @@ float z_probe() {
return mm;
}

void calibrate_print_surface() {
void calibrate_print_surface(float z_offset) {
for (int y = 3; y >= -3; y--) {
int dir = y % 2 ? 1 : -1;
int dir = y % 2 ? -1 : 1;
for (int x = -3*dir; x != 4*dir; x += dir) {
if (x*x + y*y < 11) {
destination[X_AXIS] = 25 * x - z_probe_offset[X_AXIS];
destination[Y_AXIS] = 25 * y - z_probe_offset[Y_AXIS];
bed_level[x+3][y+3] = z_probe() - z_probe_offset[Z_AXIS];
destination[X_AXIS] = 25 * x + z_probe_offset[X_AXIS];
destination[Y_AXIS] = 25 * y + z_probe_offset[Y_AXIS];
bed_level[x+3][y+3] = z_probe() + z_offset;
} else {
bed_level[x+3][y+3] = 0.0;
}
Expand Down Expand Up @@ -900,7 +900,8 @@ void process_commands()
feedmultiply = 100;

deploy_z_probe();
calibrate_print_surface();
calibrate_print_surface(z_probe_offset[Z_AXIS] +
(code_seen(axis_codes[Z_AXIS]) ? code_value() : 0.0));
retract_z_probe();

feedrate = saved_feedrate;
Expand Down

0 comments on commit b0a379a

Please sign in to comment.