Move M82_M83 to cpp

This commit is contained in:
Scott Lahteine 2017-09-16 23:27:06 -05:00
parent 4b9d1b9f26
commit a911215b0e
3 changed files with 7 additions and 12 deletions

View file

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

View file

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

View file

@ -20,12 +20,14 @@
* *
*/ */
#include "../gcode.h"
/** /**
* M82: Set E codes absolute (default) * 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 * 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; }