mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Move M666 to cpp
This commit is contained in:
parent
f5877aa93e
commit
6c7bad8bc3
@ -355,10 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#include "gcode/calibrate/M666.h"
|
||||
#endif
|
||||
|
||||
#include "gcode/control/M211.h"
|
||||
|
||||
#include "gcode/config/M220.h"
|
||||
|
@ -20,15 +20,24 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
#if ENABLED(DELTA)
|
||||
|
||||
#include "../../module/delta.h"
|
||||
#include "../../module/motion.h"
|
||||
|
||||
/**
|
||||
* M666: Set delta endstop adjustment
|
||||
*/
|
||||
void gcode_M666() {
|
||||
void GcodeSuite::M666() {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPGM(">>> gcode_M666");
|
||||
SERIAL_ECHOLNPGM(">>> M666");
|
||||
}
|
||||
#endif
|
||||
LOOP_XYZ(i) {
|
||||
@ -44,7 +53,7 @@
|
||||
}
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOLNPGM("<<< gcode_M666");
|
||||
SERIAL_ECHOLNPGM("<<< M666");
|
||||
}
|
||||
#endif
|
||||
// normalize endstops so all are <=0; set the residue to delta height
|
||||
@ -55,12 +64,16 @@
|
||||
|
||||
#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
#include "../../Marlin.h" // for z_endstop_adj
|
||||
|
||||
/**
|
||||
* M666: For Z Dual Endstop setup, set z axis offset to the z2 axis.
|
||||
*/
|
||||
void gcode_M666() {
|
||||
void GcodeSuite::M666() {
|
||||
if (parser.seen('Z')) z_endstop_adj = parser.value_linear_units();
|
||||
SERIAL_ECHOLNPAIR("Z Endstop Adjustment set to (mm):", z_endstop_adj);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // DELTA || Z_DUAL_ENDSTOPS
|
@ -151,7 +151,6 @@ extern void gcode_M502();
|
||||
extern void gcode_M503();
|
||||
extern void gcode_M540();
|
||||
extern void gcode_M605();
|
||||
extern void gcode_M666();
|
||||
extern void gcode_M702();
|
||||
extern void gcode_M900();
|
||||
extern void gcode_M906();
|
||||
@ -544,9 +543,7 @@ void GcodeSuite::process_next_command() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
case 666: // M666: Set delta or dual endstop adjustment
|
||||
gcode_M666();
|
||||
break;
|
||||
case 666: M666(); break; // M666: Set delta or dual endstop adjustment
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
|
Loading…
Reference in New Issue
Block a user