Browse Source

Move M401_M402 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
1fe25271e4
  1. 4
      Marlin/src/Marlin.cpp
  2. 12
      Marlin/src/gcode/gcode.cpp
  3. 12
      Marlin/src/gcode/probe/M401_M402.cpp

4
Marlin/src/Marlin.cpp

@ -352,10 +352,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#if HAS_BED_PROBE
#include "gcode/probe/M401_M402.h"
#endif
void quickstop_stepper() {
stepper.quick_stop();
stepper.synchronize();

12
Marlin/src/gcode/gcode.cpp

@ -122,8 +122,6 @@ extern void gcode_M165();
extern void gcode_M350();
extern void gcode_M351();
extern void gcode_M355();
extern void gcode_M401();
extern void gcode_M402();
extern void gcode_M428();
extern void gcode_M500();
extern void gcode_M501();
@ -601,13 +599,9 @@ void GcodeSuite::process_next_command() {
case 400: M400(); break; // M400: Finish all moves
#if HAS_BED_PROBE
case 401: // M401: Deploy probe
gcode_M401();
break;
case 402: // M402: Stow probe
gcode_M402();
break;
#endif // HAS_BED_PROBE
case 401: M401(); break; // M401: Deploy probe
case 402: M402(); break; // M402: Stow probe
#endif
#if ENABLED(FILAMENT_WIDTH_SENSOR)
case 404: // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width

12
Marlin/src/gcode/probe/M401_M402.h → Marlin/src/gcode/probe/M401_M402.cpp

@ -20,13 +20,21 @@
*
*/
#include "../../inc/MarlinConfig.h"
#if HAS_BED_PROBE
#include "../gcode.h"
#include "../../module/probe.h"
/**
* M401: Engage Z Servo endstop if available
*/
void gcode_M401() { DEPLOY_PROBE(); }
void GcodeSuite::M401() { DEPLOY_PROBE(); }
/**
* M402: Retract Z Servo endstop if enabled
*/
void gcode_M402() { STOW_PROBE(); }
void GcodeSuite::M402() { STOW_PROBE(); }
#endif // HAS_BED_PROBE
Loading…
Cancel
Save