|
@@ -7106,6 +7106,40 @@ void quickstop_stepper() {
|
7106
|
7106
|
}
|
7107
|
7107
|
}
|
7108
|
7108
|
|
|
7109
|
+#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
7110
|
+
|
|
7111
|
+ /**
|
|
7112
|
+ * M421: Set a single Mesh Bed Leveling Z coordinate
|
|
7113
|
+ *
|
|
7114
|
+ * M421 I<xindex> J<yindex> Z<linear>
|
|
7115
|
+ */
|
|
7116
|
+ inline void gcode_M421() {
|
|
7117
|
+ int8_t px = 0, py = 0;
|
|
7118
|
+ float z = 0;
|
|
7119
|
+ bool hasI, hasJ, hasZ;
|
|
7120
|
+ if ((hasI = code_seen('I'))) px = code_value_axis_units(X_AXIS);
|
|
7121
|
+ if ((hasJ = code_seen('J'))) py = code_value_axis_units(Y_AXIS);
|
|
7122
|
+ if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS);
|
|
7123
|
+
|
|
7124
|
+ if (hasI && hasJ && hasZ) {
|
|
7125
|
+ if (px >= 0 && px < ABL_GRID_MAX_POINTS_X && py >= 0 && py < ABL_GRID_MAX_POINTS_X) {
|
|
7126
|
+ bed_level_grid[px][py] = z;
|
|
7127
|
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
|
7128
|
+ bed_level_virt_prepare();
|
|
7129
|
+ bed_level_virt_interpolate();
|
|
7130
|
+ #endif
|
|
7131
|
+ }
|
|
7132
|
+ else {
|
|
7133
|
+ SERIAL_ERROR_START;
|
|
7134
|
+ SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY);
|
|
7135
|
+ }
|
|
7136
|
+ }
|
|
7137
|
+ else {
|
|
7138
|
+ SERIAL_ERROR_START;
|
|
7139
|
+ SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS);
|
|
7140
|
+ }
|
|
7141
|
+ }
|
|
7142
|
+
|
7109
|
7143
|
#endif
|
7110
|
7144
|
|
7111
|
7145
|
/**
|