Move M206 to cpp
This commit is contained in:
parent
7aca9fe2f7
commit
33861d4e04
|
@ -355,10 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_M206_COMMAND
|
|
||||||
#include "gcode/geometry/M206.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_KINEMATIC
|
#if IS_KINEMATIC
|
||||||
#include "gcode/calibrate/M665.h"
|
#include "gcode/calibrate/M665.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
|
||||||
extern void gcode_M163();
|
extern void gcode_M163();
|
||||||
extern void gcode_M164();
|
extern void gcode_M164();
|
||||||
extern void gcode_M165();
|
extern void gcode_M165();
|
||||||
extern void gcode_M206();
|
|
||||||
extern void gcode_M211();
|
extern void gcode_M211();
|
||||||
extern void gcode_M220();
|
extern void gcode_M220();
|
||||||
extern void gcode_M226();
|
extern void gcode_M226();
|
||||||
|
@ -538,9 +537,7 @@ void GcodeSuite::process_next_command() {
|
||||||
case 205: M205(); break; // M205: Set advanced settings
|
case 205: M205(); break; // M205: Set advanced settings
|
||||||
|
|
||||||
#if HAS_M206_COMMAND
|
#if HAS_M206_COMMAND
|
||||||
case 206: // M206: Set home offsets
|
case 206: M206(); break; // M206: Set home offsets
|
||||||
gcode_M206();
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
|
|
|
@ -20,6 +20,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if HAS_M206_COMMAND
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../module/motion.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
|
* M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
|
||||||
*
|
*
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
* *** M206 for SCARA will remain enabled in 1.1.x for compatibility.
|
* *** M206 for SCARA will remain enabled in 1.1.x for compatibility.
|
||||||
* *** In the 2.0 release, it will simply be disabled by default.
|
* *** In the 2.0 release, it will simply be disabled by default.
|
||||||
*/
|
*/
|
||||||
void gcode_M206() {
|
void GcodeSuite::M206() {
|
||||||
LOOP_XYZ(i)
|
LOOP_XYZ(i)
|
||||||
if (parser.seen(axis_codes[i]))
|
if (parser.seen(axis_codes[i]))
|
||||||
set_home_offset((AxisEnum)i, parser.value_linear_units());
|
set_home_offset((AxisEnum)i, parser.value_linear_units());
|
||||||
|
@ -40,3 +47,5 @@ void gcode_M206() {
|
||||||
SYNC_PLAN_POSITION_KINEMATIC();
|
SYNC_PLAN_POSITION_KINEMATIC();
|
||||||
report_current_position();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAS_M206_COMMAND
|
Loading…
Reference in a new issue