|
@@ -1808,6 +1808,11 @@ static void setup_for_endstop_move() {
|
1808
|
1808
|
|
1809
|
1809
|
#endif // AUTO_BED_LEVELING_FEATURE
|
1810
|
1810
|
|
|
1811
|
+static void unknown_position_error() {
|
|
1812
|
+ LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
|
|
1813
|
+ SERIAL_ECHO_START;
|
|
1814
|
+ SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
|
|
1815
|
+}
|
1811
|
1816
|
|
1812
|
1817
|
#if ENABLED(Z_PROBE_SLED)
|
1813
|
1818
|
|
|
@@ -3651,6 +3656,11 @@ inline void gcode_M42() {
|
3651
|
3656
|
*/
|
3652
|
3657
|
inline void gcode_M48() {
|
3653
|
3658
|
|
|
3659
|
+ if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS] || !axis_known_position[Z_AXIS]) {
|
|
3660
|
+ unknown_position_error();
|
|
3661
|
+ return;
|
|
3662
|
+ }
|
|
3663
|
+
|
3654
|
3664
|
double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
|
3655
|
3665
|
uint8_t verbose_level = 1, n_samples = 10, n_legs = 0, schizoid_flag = 0;
|
3656
|
3666
|
|