Browse Source

Move M82_M83 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
a911215b0e
  1. 2
      Marlin/src/Marlin.cpp
  2. 11
      Marlin/src/gcode/gcode.cpp
  3. 6
      Marlin/src/gcode/units/M82_M83.cpp

2
Marlin/src/Marlin.cpp

@ -359,8 +359,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#include "gcode/units/M82_M83.h"
#include "gcode/control/M18_M84.h"
#include "gcode/control/M85.h"

11
Marlin/src/gcode/gcode.cpp

@ -117,8 +117,6 @@ void GcodeSuite::dwell(millis_t time) {
// Placeholders for non-migrated codes
//
extern void gcode_M18_M84();
extern void gcode_M82();
extern void gcode_M83();
extern void gcode_M85();
extern void gcode_M92();
extern void gcode_M100();
@ -495,12 +493,9 @@ void GcodeSuite::process_next_command() {
case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible
case 82: // M82: Set E axis normal mode (same as other axes)
gcode_M82();
break;
case 83: // M83: Set E axis relative mode
gcode_M83();
break;
case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
case 83: M83(); break; // M83: Set E axis relative mode
case 18: // M18 => M84
case 84: // M84: Disable all steppers or set timeout
gcode_M18_M84();

6
Marlin/src/gcode/units/M82_M83.h → Marlin/src/gcode/units/M82_M83.cpp

@ -20,12 +20,14 @@
*
*/
#include "../gcode.h"
/**
* M82: Set E codes absolute (default)
*/
void gcode_M82() { gcode.axis_relative_modes[E_AXIS] = false; }
void GcodeSuite::M82() { axis_relative_modes[E_AXIS] = false; }
/**
* M83: Set E codes relative while in Absolute Coordinates (G90) mode
*/
void gcode_M83() { gcode.axis_relative_modes[E_AXIS] = true; }
void GcodeSuite::M83() { axis_relative_modes[E_AXIS] = true; }
Loading…
Cancel
Save