Browse Source

Move G92 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
04376975ce
  1. 2
      Marlin/src/Marlin.cpp
  2. 5
      Marlin/src/gcode/gcode.cpp
  3. 10
      Marlin/src/gcode/geometry/G92.cpp

2
Marlin/src/Marlin.cpp

@ -357,8 +357,6 @@ void suicide() {
***************** GCode Handlers ***************** ***************** GCode Handlers *****************
**************************************************/ **************************************************/
#include "gcode/geometry/G92.h"
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE
#include "gcode/lcd/M0_M1.h" #include "gcode/lcd/M0_M1.h"
#endif #endif

5
Marlin/src/gcode/gcode.cpp

@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
// //
// Placeholders for non-migrated codes // Placeholders for non-migrated codes
// //
extern void gcode_G92();
extern void gcode_M0_M1(); extern void gcode_M0_M1();
extern void gcode_M3_M4(bool is_M3); extern void gcode_M3_M4(bool is_M3);
extern void gcode_M5(); extern void gcode_M5();
@ -394,8 +393,8 @@ void GcodeSuite::process_next_command() {
relative_mode = true; relative_mode = true;
break; break;
case 92: // G92 case 92: // G92 - Set current axis position(s)
gcode_G92(); G92();
break; break;
#if HAS_MESH #if HAS_MESH

10
Marlin/src/gcode/geometry/G92.h → Marlin/src/gcode/geometry/G92.cpp

@ -20,10 +20,18 @@
* *
*/ */
#include "../gcode.h"
#include "../../module/motion.h"
#include "../../module/stepper.h"
#if ENABLED(I2C_POSITION_ENCODERS)
#include "../../feature/I2CPositionEncoder.h"
#endif
/** /**
* G92: Set current position to given X Y Z E * G92: Set current position to given X Y Z E
*/ */
void gcode_G92() { void GcodeSuite::G92() {
bool didXYZ = false, bool didXYZ = false,
didE = parser.seenval('E'); didE = parser.seenval('E');
Loading…
Cancel
Save