|
@@ -20,9 +20,18 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
23
|
|
-#include "../gcode.h"
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if ENABLED(PINS_DEBUGGING)
|
24
|
26
|
|
|
27
|
+#include "../gcode.h"
|
|
28
|
+#include "../../Marlin.h" // for pin_is_protected
|
25
|
29
|
#include "../../pins/pinsDebug.h"
|
|
30
|
+#include "../../module/endstops.h"
|
|
31
|
+
|
|
32
|
+#if HAS_Z_SERVO_ENDSTOP
|
|
33
|
+ #include "../../module/probe.h"
|
|
34
|
+#endif
|
26
|
35
|
|
27
|
36
|
inline void toggle_pins() {
|
28
|
37
|
const bool I_flag = parser.boolval('I');
|
|
@@ -227,7 +236,7 @@ inline void servo_probe_test() {
|
227
|
236
|
* M43 S - Servo probe test
|
228
|
237
|
* P<index> - Probe index (optional - defaults to 0
|
229
|
238
|
*/
|
230
|
|
-void gcode_M43() {
|
|
239
|
+void GcodeSuite::M43() {
|
231
|
240
|
|
232
|
241
|
if (parser.seen('T')) { // must be first or else its "S" and "E" parameters will execute endstop or servo test
|
233
|
242
|
toggle_pins();
|
|
@@ -311,3 +320,5 @@ void gcode_M43() {
|
311
|
320
|
for (uint8_t pin = first_pin; pin <= last_pin; pin++)
|
312
|
321
|
if (VALID_PIN(pin)) report_pin_state_extended(pin, ignore_protection, true);
|
313
|
322
|
}
|
|
323
|
+
|
|
324
|
+#endif // PINS_DEBUGGING
|