|
@@ -2645,14 +2645,14 @@ inline void gcode_G28() {
|
2645
|
2645
|
*/
|
2646
|
2646
|
#if ENABLED(MESH_BED_LEVELING)
|
2647
|
2647
|
float pre_home_z = MESH_HOME_SEARCH_Z;
|
2648
|
|
- if (mbl.is_active()) {
|
|
2648
|
+ if (mbl.active()) {
|
2649
|
2649
|
// Save known Z position if already homed
|
2650
|
2650
|
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) {
|
2651
|
2651
|
pre_home_z = current_position[Z_AXIS];
|
2652
|
2652
|
pre_home_z += mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
|
2653
|
2653
|
current_position[Y_AXIS] - home_offset[Y_AXIS]);
|
2654
|
2654
|
}
|
2655
|
|
- mbl.is_active(false);
|
|
2655
|
+ mbl.set_active(false);
|
2656
|
2656
|
}
|
2657
|
2657
|
#endif
|
2658
|
2658
|
|
|
@@ -2957,7 +2957,7 @@ inline void gcode_G28() {
|
2957
|
2957
|
if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
|
2958
|
2958
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
|
2959
|
2959
|
sync_plan_position();
|
2960
|
|
- mbl.is_active(true);
|
|
2960
|
+ mbl.set_active(true);
|
2961
|
2961
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
2962
|
2962
|
current_position[Z_AXIS] = 0.0;
|
2963
|
2963
|
set_destination_to_current();
|
|
@@ -2973,7 +2973,7 @@ inline void gcode_G28() {
|
2973
|
2973
|
else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) {
|
2974
|
2974
|
current_position[Z_AXIS] = pre_home_z;
|
2975
|
2975
|
sync_plan_position();
|
2976
|
|
- mbl.is_active(true);
|
|
2976
|
+ mbl.set_active(true);
|
2977
|
2977
|
current_position[Z_AXIS] = pre_home_z -
|
2978
|
2978
|
mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
|
2979
|
2979
|
current_position[Y_AXIS] - home_offset[Y_AXIS]);
|
|
@@ -3060,7 +3060,7 @@ inline void gcode_G28() {
|
3060
|
3060
|
case MeshReport:
|
3061
|
3061
|
if (mbl.has_mesh()) {
|
3062
|
3062
|
SERIAL_PROTOCOLPGM("State: ");
|
3063
|
|
- if (mbl.is_active())
|
|
3063
|
+ if (mbl.active())
|
3064
|
3064
|
SERIAL_PROTOCOLPGM("On");
|
3065
|
3065
|
else
|
3066
|
3066
|
SERIAL_PROTOCOLPGM("Off");
|
|
@@ -3125,7 +3125,7 @@ inline void gcode_G28() {
|
3125
|
3125
|
// After recording the last point, activate the mbl and home
|
3126
|
3126
|
SERIAL_PROTOCOLLNPGM("Mesh probing done.");
|
3127
|
3127
|
probe_point = -1;
|
3128
|
|
- mbl.has_mesh(true);
|
|
3128
|
+ mbl.set_has_mesh(true);
|
3129
|
3129
|
enqueue_and_echo_commands_P(PSTR("G28"));
|
3130
|
3130
|
}
|
3131
|
3131
|
break;
|
|
@@ -3175,7 +3175,7 @@ inline void gcode_G28() {
|
3175
|
3175
|
break;
|
3176
|
3176
|
|
3177
|
3177
|
case MeshReset:
|
3178
|
|
- if (mbl.is_active()) {
|
|
3178
|
+ if (mbl.active()) {
|
3179
|
3179
|
current_position[Z_AXIS] +=
|
3180
|
3180
|
mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
|
3181
|
3181
|
current_position[Y_AXIS] - home_offset[Y_AXIS]) - MESH_HOME_SEARCH_Z;
|
|
@@ -5982,7 +5982,7 @@ inline void gcode_M410() {
|
5982
|
5982
|
/**
|
5983
|
5983
|
* M420: Enable/Disable Mesh Bed Leveling
|
5984
|
5984
|
*/
|
5985
|
|
- inline void gcode_M420() { if (code_seen('S') && code_has_value()) mbl.has_mesh(!!code_value_short()); }
|
|
5985
|
+ inline void gcode_M420() { if (code_seen('S') && code_has_value()) mbl.set_has_mesh(!!code_value_short()); }
|
5986
|
5986
|
|
5987
|
5987
|
/**
|
5988
|
5988
|
* M421: Set a single Mesh Bed Leveling Z coordinate
|
|
@@ -7373,7 +7373,7 @@ void clamp_to_software_endstops(float target[3]) {
|
7373
|
7373
|
|
7374
|
7374
|
// This function is used to split lines on mesh borders so each segment is only part of one mesh area
|
7375
|
7375
|
void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate, const uint8_t& extruder, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
|
7376
|
|
- if (!mbl.is_active()) {
|
|
7376
|
+ if (!mbl.active()) {
|
7377
|
7377
|
planner.buffer_line(x, y, z, e, feed_rate, extruder);
|
7378
|
7378
|
set_current_to_destination();
|
7379
|
7379
|
return;
|