Move M43 to cpp
This commit is contained in:
parent
10fab24e50
commit
be8d913484
@ -370,10 +370,6 @@ bool pin_is_protected(const int8_t pin) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(PINS_DEBUGGING)
|
|
||||||
#include "gcode/config/M43.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
||||||
#include "gcode/calibrate/M48.h"
|
#include "gcode/calibrate/M48.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,9 +20,18 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../gcode.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if ENABLED(PINS_DEBUGGING)
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../Marlin.h" // for pin_is_protected
|
||||||
#include "../../pins/pinsDebug.h"
|
#include "../../pins/pinsDebug.h"
|
||||||
|
#include "../../module/endstops.h"
|
||||||
|
|
||||||
|
#if HAS_Z_SERVO_ENDSTOP
|
||||||
|
#include "../../module/probe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
inline void toggle_pins() {
|
inline void toggle_pins() {
|
||||||
const bool I_flag = parser.boolval('I');
|
const bool I_flag = parser.boolval('I');
|
||||||
@ -227,7 +236,7 @@ inline void servo_probe_test() {
|
|||||||
* M43 S - Servo probe test
|
* M43 S - Servo probe test
|
||||||
* P<index> - Probe index (optional - defaults to 0
|
* P<index> - Probe index (optional - defaults to 0
|
||||||
*/
|
*/
|
||||||
void gcode_M43() {
|
void GcodeSuite::M43() {
|
||||||
|
|
||||||
if (parser.seen('T')) { // must be first or else its "S" and "E" parameters will execute endstop or servo test
|
if (parser.seen('T')) { // must be first or else its "S" and "E" parameters will execute endstop or servo test
|
||||||
toggle_pins();
|
toggle_pins();
|
||||||
@ -311,3 +320,5 @@ void gcode_M43() {
|
|||||||
for (uint8_t pin = first_pin; pin <= last_pin; pin++)
|
for (uint8_t pin = first_pin; pin <= last_pin; pin++)
|
||||||
if (VALID_PIN(pin)) report_pin_state_extended(pin, ignore_protection, true);
|
if (VALID_PIN(pin)) report_pin_state_extended(pin, ignore_protection, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // PINS_DEBUGGING
|
@ -117,7 +117,6 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
// Placeholders for non-migrated codes
|
// Placeholders for non-migrated codes
|
||||||
//
|
//
|
||||||
extern void gcode_M18_M84();
|
extern void gcode_M18_M84();
|
||||||
extern void gcode_M43();
|
|
||||||
extern void gcode_M48();
|
extern void gcode_M48();
|
||||||
extern void gcode_M75();
|
extern void gcode_M75();
|
||||||
extern void gcode_M76();
|
extern void gcode_M76();
|
||||||
@ -435,11 +434,9 @@ void GcodeSuite::process_next_command() {
|
|||||||
case 42: M42(); break; // M42: Change pin state
|
case 42: M42(); break; // M42: Change pin state
|
||||||
|
|
||||||
#if ENABLED(PINS_DEBUGGING)
|
#if ENABLED(PINS_DEBUGGING)
|
||||||
case 43: // M43: Read pin state
|
case 43: M43(); break; // M43: Read pin state
|
||||||
gcode_M43(); break;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
||||||
case 48: // M48: Z probe repeatability test
|
case 48: // M48: Z probe repeatability test
|
||||||
gcode_M48();
|
gcode_M48();
|
||||||
|
Loading…
Reference in New Issue
Block a user