Move G42 to cpp
This commit is contained in:
parent
84ddae56a8
commit
931aa79d85
|
@ -357,10 +357,6 @@ void suicide() {
|
|||
***************** GCode Handlers *****************
|
||||
**************************************************/
|
||||
|
||||
#if HAS_MESH
|
||||
#include "gcode/probe/G42.h"
|
||||
#endif
|
||||
|
||||
#include "gcode/geometry/G92.h"
|
||||
|
||||
#if HAS_RESUME_CONTINUE
|
||||
|
|
|
@ -20,10 +20,19 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_MESH
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../Marlin.h" // for IsRunning()
|
||||
#include "../../module/motion.h"
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
|
||||
/**
|
||||
* G42: Move X & Y axes to mesh coordinates (I & J)
|
||||
*/
|
||||
void gcode_G42() {
|
||||
void GcodeSuite::G42() {
|
||||
if (IsRunning()) {
|
||||
const bool hasI = parser.seenval('I');
|
||||
const int8_t ix = hasI ? parser.value_int() : 0;
|
||||
|
@ -65,3 +74,5 @@ void gcode_G42() {
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_MESH
|
|
@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
|
|||
//
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
extern void gcode_G42();
|
||||
extern void gcode_G92();
|
||||
extern void gcode_M0_M1();
|
||||
extern void gcode_M3_M4(bool is_M3);
|
||||
|
@ -400,9 +399,7 @@ void GcodeSuite::process_next_command() {
|
|||
break;
|
||||
|
||||
#if HAS_MESH
|
||||
case 42:
|
||||
gcode_G42();
|
||||
break;
|
||||
case 42: G42(); break; // G42: Coordinated move to a mesh point
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
* G32 - Undock sled (Z_PROBE_SLED only)
|
||||
* G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
|
||||
* G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
|
||||
* G42 - Coordinated move to a mesh point (Requires AUTO_BED_LEVELING_UBL)
|
||||
* G42 - Coordinated move to a mesh point (Requires HAS_MESH)
|
||||
* G90 - Use Absolute Coordinates
|
||||
* G91 - Use Relative Coordinates
|
||||
* G92 - Set current position to coordinates given
|
||||
|
|
Loading…
Reference in a new issue