Move M605 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 17:24:56 -05:00
parent 75cf17d816
commit 1b0acbff72
3 changed files with 14 additions and 11 deletions

View file

@ -359,10 +359,6 @@ void quickstop_stepper() {
SYNC_PLAN_POSITION_KINEMATIC(); SYNC_PLAN_POSITION_KINEMATIC();
} }
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
#include "gcode/control/M605.h"
#endif
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
#include "gcode/feature/advance/M900.h" #include "gcode/feature/advance/M900.h"
#endif #endif

View file

@ -20,6 +20,14 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
#include "../gcode.h"
#include "../../module/motion.h"
#include "../../module/stepper.h"
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
/** /**
@ -34,7 +42,7 @@
* *
* Note: the X axis should be homed after changing dual x-carriage mode. * Note: the X axis should be homed after changing dual x-carriage mode.
*/ */
void gcode_M605() { void GcodeSuite::M605() {
stepper.synchronize(); stepper.synchronize();
if (parser.seen('S')) dual_x_carriage_mode = (DualXMode)parser.value_byte(); if (parser.seen('S')) dual_x_carriage_mode = (DualXMode)parser.value_byte();
switch (dual_x_carriage_mode) { switch (dual_x_carriage_mode) {
@ -66,7 +74,7 @@
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) #elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
void gcode_M605() { void GcodeSuite::M605() {
stepper.synchronize(); stepper.synchronize();
extruder_duplication_enabled = parser.intval('S') == (int)DXC_DUPLICATION_MODE; extruder_duplication_enabled = parser.intval('S') == (int)DXC_DUPLICATION_MODE;
SERIAL_ECHO_START(); SERIAL_ECHO_START();
@ -74,3 +82,5 @@
} }
#endif // DUAL_NOZZLE_DUPLICATION_MODE #endif // DUAL_NOZZLE_DUPLICATION_MODE
#endif // DUAL_X_CARRIAGE || DUAL_NOZZLE_DUPLICATION_MODE

View file

@ -122,7 +122,6 @@ extern void gcode_M165();
extern void gcode_M350(); extern void gcode_M350();
extern void gcode_M351(); extern void gcode_M351();
extern void gcode_M355(); extern void gcode_M355();
extern void gcode_M605();
extern void gcode_M900(); extern void gcode_M900();
extern void gcode_M906(); extern void gcode_M906();
extern void gcode_M911(); extern void gcode_M911();
@ -651,10 +650,8 @@ void GcodeSuite::process_next_command() {
#endif // ADVANCED_PAUSE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
case 605: // M605: Set Dual X Carriage movement mode case 605: M605(); break; // M605: Set Dual X Carriage movement mode
gcode_M605(); #endif
break;
#endif // DUAL_X_CARRIAGE
#if ENABLED(MK2_MULTIPLEXER) #if ENABLED(MK2_MULTIPLEXER)
case 702: M702(); break; // M702: Unload all extruders case 702: M702(); break; // M702: Unload all extruders