|
@@ -20,6 +20,15 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if HAS_BED_PROBE
|
|
26
|
+
|
|
27
|
+#include "../gcode.h"
|
|
28
|
+#include "../../module/motion.h"
|
|
29
|
+#include "../../module/probe.h"
|
|
30
|
+#include "../../feature/bedlevel/bedlevel.h"
|
|
31
|
+
|
23
|
32
|
/**
|
24
|
33
|
* G30: Do a single Z probe at the current XY
|
25
|
34
|
*
|
|
@@ -29,7 +38,7 @@
|
29
|
38
|
* Y Probe Y position (default current Y)
|
30
|
39
|
* S0 Leave the probe deployed
|
31
|
40
|
*/
|
32
|
|
-void gcode_G30() {
|
|
41
|
+void GcodeSuite::G30() {
|
33
|
42
|
const float xpos = parser.linearval('X', current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER),
|
34
|
43
|
ypos = parser.linearval('Y', current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER);
|
35
|
44
|
|
|
@@ -54,3 +63,5 @@ void gcode_G30() {
|
54
|
63
|
|
55
|
64
|
report_current_position();
|
56
|
65
|
}
|
|
66
|
+
|
|
67
|
+#endif // HAS_BED_PROBE
|