|
|
@ -135,8 +135,8 @@
|
|
|
|
* a subsequent G or T leveling operation for backward compatibility.
|
|
|
|
* a subsequent G or T leveling operation for backward compatibility.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using
|
|
|
|
* P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using
|
|
|
|
* the Z-Probe. Usually the probe can not reach all areas that the nozzle can reach.
|
|
|
|
* the Z-Probe. Usually the probe can't reach all areas that the nozzle can reach. On
|
|
|
|
* In Cartesian printers, mesh points within the X_OFFSET_FROM_EXTRUDER and Y_OFFSET_FROM_EXTRUDER
|
|
|
|
* Cartesian printers, points within the X_PROBE_OFFSET_FROM_EXTRUDER and Y_PROBE_OFFSET_FROM_EXTRUDER
|
|
|
|
* area cannot be automatically probed. For Delta printers the area in which DELTA_PROBEABLE_RADIUS
|
|
|
|
* area cannot be automatically probed. For Delta printers the area in which DELTA_PROBEABLE_RADIUS
|
|
|
|
* and DELTA_PRINTABLE_RADIUS do not overlap will not be automatically probed.
|
|
|
|
* and DELTA_PRINTABLE_RADIUS do not overlap will not be automatically probed.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -660,9 +660,9 @@
|
|
|
|
do_blocking_move_to_z(measured_z);
|
|
|
|
do_blocking_move_to_z(measured_z);
|
|
|
|
} while (!ubl_lcd_clicked());
|
|
|
|
} while (!ubl_lcd_clicked());
|
|
|
|
|
|
|
|
|
|
|
|
ubl.has_control_of_lcd_panel = true; // There is a race condition for the Encoder Wheel getting clicked.
|
|
|
|
ubl.has_control_of_lcd_panel = true; // There is a race condition for the encoder click.
|
|
|
|
// It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune)
|
|
|
|
// It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune)
|
|
|
|
// or here. So, until we are done looking for a long Encoder Wheel Press,
|
|
|
|
// or here. So, until we are done looking for a long encoder press,
|
|
|
|
// we need to take control of the panel
|
|
|
|
// we need to take control of the panel
|
|
|
|
|
|
|
|
|
|
|
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
|
|
KEEPALIVE_STATE(IN_HANDLER);
|
|
|
@ -1346,10 +1346,10 @@
|
|
|
|
my = pgm_read_float(&ubl.mesh_index_to_ypos[j]);
|
|
|
|
my = pgm_read_float(&ubl.mesh_index_to_ypos[j]);
|
|
|
|
|
|
|
|
|
|
|
|
// If using the probe as the reference there are some unreachable locations.
|
|
|
|
// If using the probe as the reference there are some unreachable locations.
|
|
|
|
// Also for round beds, there are grid points outside the bed that nozzle can't reach.
|
|
|
|
// Also for round beds, there are grid points outside the bed the nozzle can't reach.
|
|
|
|
// Prune them from the list and ignore them till the next Phase (manual nozzle probing).
|
|
|
|
// Prune them from the list and ignore them till the next Phase (manual nozzle probing).
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! (probe_as_reference ? position_is_reachable_by_probe_raw_xy(mx, my) : position_is_reachable_raw_xy(mx, my)) )
|
|
|
|
if (probe_as_reference ? !position_is_reachable_by_probe_raw_xy(mx, my) : !position_is_reachable_raw_xy(mx, my))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
// Reachable. Check if it's the closest location to the nozzle.
|
|
|
|
// Reachable. Check if it's the closest location to the nozzle.
|
|
|
@ -1390,8 +1390,8 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) {
|
|
|
|
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) {
|
|
|
|
if (!code_seen('R')) // fine_tune_mesh() is special. If no repetion count flag is specified
|
|
|
|
if (!code_seen('R')) // fine_tune_mesh() is special. If no repetition count flag is specified
|
|
|
|
repetition_cnt = 1; // we know to do exactly one mesh location. Otherwise we use what the parser decided.
|
|
|
|
repetition_cnt = 1; // do exactly one mesh location. Otherwise use what the parser decided.
|
|
|
|
|
|
|
|
|
|
|
|
mesh_index_pair location;
|
|
|
|
mesh_index_pair location;
|
|
|
|
uint16_t not_done[16];
|
|
|
|
uint16_t not_done[16];
|
|
|
@ -1421,9 +1421,8 @@
|
|
|
|
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]),
|
|
|
|
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]),
|
|
|
|
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]);
|
|
|
|
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]);
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! position_is_reachable_raw_xy( rawx, rawy )) { // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable
|
|
|
|
if (!position_is_reachable_raw_xy(rawx, rawy)) // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float new_z = ubl.z_values[location.x_index][location.y_index];
|
|
|
|
float new_z = ubl.z_values[location.x_index][location.y_index];
|
|
|
|
|
|
|
|
|
|
|
@ -1432,8 +1431,7 @@
|
|
|
|
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); // Move the nozzle to where we are going to edit
|
|
|
|
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); // Move the nozzle to where we are going to edit
|
|
|
|
do_blocking_move_to_xy(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy));
|
|
|
|
do_blocking_move_to_xy(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy));
|
|
|
|
|
|
|
|
|
|
|
|
round_off = (int32_t)(new_z * 1000.0); // we chop off the last digits just to be clean. We are rounding to the
|
|
|
|
new_z = floor(new_z * 1000.0) * 0.001; // Chop off digits after the 1000ths place
|
|
|
|
new_z = float(round_off) / 1000.0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
|
|
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
|
|
|
ubl.has_control_of_lcd_panel = true;
|
|
|
|
ubl.has_control_of_lcd_panel = true;
|
|
|
@ -1451,9 +1449,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
lcd_return_to_status();
|
|
|
|
lcd_return_to_status();
|
|
|
|
|
|
|
|
|
|
|
|
// There is a race condition for the Encoder Wheel getting clicked.
|
|
|
|
// The technique used here generates a race condition for the encoder click.
|
|
|
|
// It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune)
|
|
|
|
// It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) or here.
|
|
|
|
// or here.
|
|
|
|
// Let's work on specifying a proper API for the LCD ASAP, OK?
|
|
|
|
ubl.has_control_of_lcd_panel = true;
|
|
|
|
ubl.has_control_of_lcd_panel = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1478,7 +1476,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
lcd_implementation_clear();
|
|
|
|
lcd_implementation_clear();
|
|
|
|
|
|
|
|
|
|
|
|
} while (( location.x_index >= 0 ) && (--repetition_cnt>0));
|
|
|
|
} while (location.x_index >= 0 && --repetition_cnt > 0);
|
|
|
|
|
|
|
|
|
|
|
|
FINE_TUNE_EXIT:
|
|
|
|
FINE_TUNE_EXIT:
|
|
|
|
|
|
|
|
|
|
|
|