1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 22:08:02 +00:00

Move M401_M402 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 04:16:28 -05:00
parent 0589884d26
commit 1fe25271e4
3 changed files with 13 additions and 15 deletions

View File

@ -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();

View File

@ -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

View File

@ -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