|
@@ -188,7 +188,7 @@
|
188
|
188
|
* M407 - Display measured filament diameter
|
189
|
189
|
* M410 - Quickstop. Abort all the planned moves
|
190
|
190
|
* M420 - Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable
|
191
|
|
- * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<index> Y<index> Z<offset in mm>
|
|
191
|
+ * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<mm> Y<mm> Z<mm>
|
192
|
192
|
* M500 - Store parameters in EEPROM
|
193
|
193
|
* M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
|
194
|
194
|
* M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
|
@@ -4467,16 +4467,15 @@ inline void gcode_M410() { quickStop(); }
|
4467
|
4467
|
* M421: Set a single Mesh Bed Leveling Z coordinate
|
4468
|
4468
|
*/
|
4469
|
4469
|
inline void gcode_M421() {
|
4470
|
|
- int x, y;
|
4471
|
|
- float z;
|
|
4470
|
+ float x, y, z;
|
4472
|
4471
|
bool err = false, hasX, hasY, hasZ;
|
4473
|
|
- if ((hasX = code_seen('X'))) x = code_value_short();
|
4474
|
|
- if ((hasY = code_seen('Y'))) y = code_value_short();
|
|
4472
|
+ if ((hasX = code_seen('X'))) x = code_value();
|
|
4473
|
+ if ((hasY = code_seen('Y'))) y = code_value();
|
4475
|
4474
|
if ((hasZ = code_seen('Z'))) z = code_value();
|
4476
|
4475
|
|
4477
|
4476
|
if (!hasX || !hasY || !hasZ) {
|
4478
|
4477
|
SERIAL_ERROR_START;
|
4479
|
|
- SERIAL_ERRORLNPGM(MSG_ERR_XYZ_REQUIRED_FOR_M421);
|
|
4478
|
+ SERIAL_ERRORLNPGM(MSG_ERR_M421_REQUIRES_XYZ);
|
4480
|
4479
|
err = true;
|
4481
|
4480
|
}
|
4482
|
4481
|
|
|
@@ -4486,7 +4485,7 @@ inline void gcode_M410() { quickStop(); }
|
4486
|
4485
|
err = true;
|
4487
|
4486
|
}
|
4488
|
4487
|
|
4489
|
|
- if (!err) mbl.z_values[y][x] = z;
|
|
4488
|
+ if (!err) mbl.set_z(select_x_index(x), select_y_index(y), z);
|
4490
|
4489
|
}
|
4491
|
4490
|
|
4492
|
4491
|
#endif
|