|
@@ -3817,7 +3817,7 @@ inline void gcode_G28() {
|
3817
|
3817
|
SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
|
3818
|
3818
|
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
|
3819
|
3819
|
print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 5,
|
3820
|
|
- [](const uint8_t ix, const uint8_t iy) { return mbl.z_values[iy][ix]; }
|
|
3820
|
+ [](const uint8_t ix, const uint8_t iy) { return mbl.z_values[ix][iy]; }
|
3821
|
3821
|
);
|
3822
|
3822
|
}
|
3823
|
3823
|
|
|
@@ -3948,7 +3948,7 @@ inline void gcode_G28() {
|
3948
|
3948
|
}
|
3949
|
3949
|
|
3950
|
3950
|
if (code_seen('Z')) {
|
3951
|
|
- mbl.z_values[py][px] = code_value_axis_units(Z_AXIS);
|
|
3951
|
+ mbl.z_values[px][py] = code_value_axis_units(Z_AXIS);
|
3952
|
3952
|
}
|
3953
|
3953
|
else {
|
3954
|
3954
|
SERIAL_CHAR('Z'); say_not_entered();
|
|
@@ -7844,7 +7844,7 @@ void quickstop_stepper() {
|
7844
|
7844
|
}
|
7845
|
7845
|
}
|
7846
|
7846
|
|
7847
|
|
-#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
7847
|
+#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
|
7848
|
7848
|
|
7849
|
7849
|
/**
|
7850
|
7850
|
* M421: Set a single Mesh Bed Leveling Z coordinate
|
|
@@ -7861,9 +7861,13 @@ void quickstop_stepper() {
|
7861
|
7861
|
|
7862
|
7862
|
if (hasI && hasJ && hasZ) {
|
7863
|
7863
|
if (WITHIN(px, 0, GRID_MAX_POINTS_X - 1) && WITHIN(py, 0, GRID_MAX_POINTS_X - 1)) {
|
7864
|
|
- bed_level_grid[px][py] = z;
|
7865
|
|
- #if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
7866
|
|
- bed_level_virt_interpolate();
|
|
7864
|
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
7865
|
+ ubl.z_values[px][py] = z;
|
|
7866
|
+ #else
|
|
7867
|
+ bed_level_grid[px][py] = z;
|
|
7868
|
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
|
7869
|
+ bed_level_virt_interpolate();
|
|
7870
|
+ #endif
|
7867
|
7871
|
#endif
|
7868
|
7872
|
}
|
7869
|
7873
|
else {
|
|
@@ -7876,34 +7880,7 @@ void quickstop_stepper() {
|
7876
|
7880
|
SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS);
|
7877
|
7881
|
}
|
7878
|
7882
|
}
|
7879
|
|
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
7880
|
|
- /**
|
7881
|
|
- * M421: Set a single Mesh Bed Leveling Z coordinate
|
7882
|
|
- *
|
7883
|
|
- * M421 I<xindex> J<yindex> Z<linear>
|
7884
|
|
- */
|
7885
|
|
- inline void gcode_M421() {
|
7886
|
|
- int8_t px = 0, py = 0;
|
7887
|
|
- float z = 0;
|
7888
|
|
- bool hasI, hasJ, hasZ;
|
7889
|
|
- if ((hasI = code_seen('I'))) px = code_value_axis_units(X_AXIS);
|
7890
|
|
- if ((hasJ = code_seen('J'))) py = code_value_axis_units(Y_AXIS);
|
7891
|
|
- if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
|
7892
|
7883
|
|
7893
|
|
- if (hasI && hasJ && hasZ) {
|
7894
|
|
- if (WITHIN(px, 0, GRID_MAX_POINTS_Y - 1) && WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) {
|
7895
|
|
- ubl.z_values[px][py] = z;
|
7896
|
|
- }
|
7897
|
|
- else {
|
7898
|
|
- SERIAL_ERROR_START;
|
7899
|
|
- SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY);
|
7900
|
|
- }
|
7901
|
|
- }
|
7902
|
|
- else {
|
7903
|
|
- SERIAL_ERROR_START;
|
7904
|
|
- SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS);
|
7905
|
|
- }
|
7906
|
|
- }
|
7907
|
7884
|
#endif
|
7908
|
7885
|
|
7909
|
7886
|
#if DISABLED(NO_WORKSPACE_OFFSETS)
|