|
@@ -20,15 +20,24 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
|
|
26
|
+
|
|
27
|
+#include "../gcode.h"
|
|
28
|
+
|
23
|
29
|
#if ENABLED(DELTA)
|
24
|
30
|
|
|
31
|
+ #include "../../module/delta.h"
|
|
32
|
+ #include "../../module/motion.h"
|
|
33
|
+
|
25
|
34
|
/**
|
26
|
35
|
* M666: Set delta endstop adjustment
|
27
|
36
|
*/
|
28
|
|
- void gcode_M666() {
|
|
37
|
+ void GcodeSuite::M666() {
|
29
|
38
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
30
|
39
|
if (DEBUGGING(LEVELING)) {
|
31
|
|
- SERIAL_ECHOLNPGM(">>> gcode_M666");
|
|
40
|
+ SERIAL_ECHOLNPGM(">>> M666");
|
32
|
41
|
}
|
33
|
42
|
#endif
|
34
|
43
|
LOOP_XYZ(i) {
|
|
@@ -44,7 +53,7 @@
|
44
|
53
|
}
|
45
|
54
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
46
|
55
|
if (DEBUGGING(LEVELING)) {
|
47
|
|
- SERIAL_ECHOLNPGM("<<< gcode_M666");
|
|
56
|
+ SERIAL_ECHOLNPGM("<<< M666");
|
48
|
57
|
}
|
49
|
58
|
#endif
|
50
|
59
|
// normalize endstops so all are <=0; set the residue to delta height
|
|
@@ -55,12 +64,16 @@
|
55
|
64
|
|
56
|
65
|
#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
|
57
|
66
|
|
|
67
|
+ #include "../../Marlin.h" // for z_endstop_adj
|
|
68
|
+
|
58
|
69
|
/**
|
59
|
70
|
* M666: For Z Dual Endstop setup, set z axis offset to the z2 axis.
|
60
|
71
|
*/
|
61
|
|
- void gcode_M666() {
|
|
72
|
+ void GcodeSuite::M666() {
|
62
|
73
|
if (parser.seen('Z')) z_endstop_adj = parser.value_linear_units();
|
63
|
74
|
SERIAL_ECHOLNPAIR("Z Endstop Adjustment set to (mm):", z_endstop_adj);
|
64
|
75
|
}
|
65
|
76
|
|
66
|
77
|
#endif
|
|
78
|
+
|
|
79
|
+#endif // DELTA || Z_DUAL_ENDSTOPS
|